Skip to contentSkip to conversation

useradd.bbclass: add dependency on base-files

PATCH New Ross Burton 1 participant 6 messages Dec 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 useradd.bbclass: add dependency on base-files

Packages that use useradd.bbclass should have a dependency on base-files so that the /etc/skel directory is populated. Without this dependency base-files may or may not be installed when the postinst runs, and the skel content may or may not be copied.

---
 meta/classes/useradd.bbclass |    2 ++
 1 file changed, 2 insertions(+)
meta/classes/useradd.bbclass +2 -0
index a850e9d..a2ad648 100644
@@ -182,6 +182,8 @@ fakeroot python populate_packages_prepend () {
         rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
         rdepends += ' ' + d.getVar('MLPREFIX') + 'base-passwd'
         rdepends += ' ' + d.getVar('MLPREFIX') + 'shadow'
+        # base-files is where the default /etc/skel is packaged
+        rdepends += ' ' + d.getVar('MLPREFIX') + 'base-files'
         d.setVar("RDEPENDS_%s" % pkg, rdepends)
 
     # Add the user/group preinstall scripts and RDEPENDS requirements
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/6 buildhistory: be quiet when garbage collecting the git repo

---
 meta/classes/buildhistory.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/buildhistory.bbclass +1 -1
index 3590da0..e9a9c3b 100644
@@ -534,7 +534,7 @@ END
 			for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
 				git commit $entry metadata-revs -m "$entry: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" -m "cmd: $CMDLINE" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
 			done
-			git gc --auto
+			git gc --auto --quiet
 			if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
 				git push -q ${BUILDHISTORY_PUSH_REPO}
 			fi
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 3/6 dbus: upgrade to 1.6.18

In reply to Ross Burton

Drop PR and INC_PR.

Move patches into a non-versioned directory, and update dbus-ptest to match.

---
 .../dbus/{dbus-ptest_1.6.10.bb => dbus-ptest_1.6.18.bb}          |    2 +-
 meta/recipes-core/dbus/dbus.inc                                  |    2 --
 meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/dbus-1.init         |    0
 meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/os-test.patch       |    0
 meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/ptest.patch         |    0
 meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/python-config.patch |    0
 meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/run-ptest           |    0
 meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/tmpdir.patch        |    0
 meta/recipes-core/dbus/dbus_1.6.10.bb                            |    6 ------
 meta/recipes-core/dbus/dbus_1.6.18.bb                            |    4 ++++
 10 files changed, 5 insertions(+), 9 deletions(-)
 rename meta/recipes-core/dbus/{dbus-ptest_1.6.10.bb => dbus-ptest_1.6.18.bb} (97%)
 rename meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/dbus-1.init (100%)
 rename meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/os-test.patch (100%)
 rename meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/ptest.patch (100%)
 rename meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/python-config.patch (100%)
 rename meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/run-ptest (100%)
 rename meta/recipes-core/dbus/{dbus-1.6.10 => dbus}/tmpdir.patch (100%)
 delete mode 100644 meta/recipes-core/dbus/dbus_1.6.10.bb
 create mode 100644 meta/recipes-core/dbus/dbus_1.6.18.bb
meta/recipes-core/dbus/dbus-ptest_1.6.18.bb renamed from meta/recipes-core/dbus/dbus-ptest_1.6.10.bb +1 -1
similarity index 97%
rename from meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
rename to meta/recipes-core/dbus/dbus-ptest_1.6.18.bb
index 84ed287..6dab751 100644
@@ -22,7 +22,7 @@ SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630"
 SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86"
 
 S="${WORKDIR}/dbus-${PV}"
-FILESPATH = "${FILE_DIRNAME}/dbus-${PV}"
+FILESPATH = "${FILE_DIRNAME}/dbus"
 
 inherit autotools pkgconfig gettext ptest
 
meta/recipes-core/dbus/dbus.inc +0 -2
index 5b99034..343079c 100644
@@ -13,8 +13,6 @@ RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest-ptest'
 RDEPENDS_dbus_class-native = ""
 RDEPENDS_dbus_class-nativesdk = ""
 
-INC_PR = "r6"
-
 SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
            file://tmpdir.patch; \
            file://dbus-1.init \
meta/recipes-core/dbus/dbus/dbus-1.init renamed from meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init +0 -0
similarity index 100%
rename from meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init
rename to meta/recipes-core/dbus/dbus/dbus-1.init
meta/recipes-core/dbus/dbus/os-test.patch renamed from meta/recipes-core/dbus/dbus-1.6.10/os-test.patch +0 -0
similarity index 100%
rename from meta/recipes-core/dbus/dbus-1.6.10/os-test.patch
rename to meta/recipes-core/dbus/dbus/os-test.patch
meta/recipes-core/dbus/dbus/ptest.patch renamed from meta/recipes-core/dbus/dbus-1.6.10/ptest.patch +0 -0
similarity index 100%
rename from meta/recipes-core/dbus/dbus-1.6.10/ptest.patch
rename to meta/recipes-core/dbus/dbus/ptest.patch
meta/recipes-core/dbus/dbus/python-config.patch renamed from meta/recipes-core/dbus/dbus-1.6.10/python-config.patch +0 -0
similarity index 100%
rename from meta/recipes-core/dbus/dbus-1.6.10/python-config.patch
rename to meta/recipes-core/dbus/dbus/python-config.patch
meta/recipes-core/dbus/dbus/run-ptest renamed from meta/recipes-core/dbus/dbus-1.6.10/run-ptest +0 -0
similarity index 100%
rename from meta/recipes-core/dbus/dbus-1.6.10/run-ptest
rename to meta/recipes-core/dbus/dbus/run-ptest
meta/recipes-core/dbus/dbus/tmpdir.patch renamed from meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch +0 -0
similarity index 100%
rename from meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch
rename to meta/recipes-core/dbus/dbus/tmpdir.patch
meta/recipes-core/dbus/dbus_1.6.10.bb deleted +0 -6
deleted file mode 100644
index 5b8220c..0000000
@@ -1,6 +0,0 @@
-include dbus.inc
-
-PR = "${INC_PR}.0"
-
-SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630"
-SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86"
meta/recipes-core/dbus/dbus_1.6.18.bb new file +4 -0
new file mode 100644
index 0000000..7270c36
@@ -0,0 +1,4 @@
+include dbus.inc
+
+SRC_URI[md5sum] = "b02e9c95027a416987b81f9893831061"
+SRC_URI[sha256sum] = "7085a0895a9eb11a952394cdbea6d8b4358e17cb991fed0e8fb85e2b9e686dcd"
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 4/6 systemd-compat-units: drop machineid.service

In reply to Ross Burton

systemd will create the machine ID automatically if it isn't set, so this unit doesn't serve any purpose.

---
 meta/recipes-core/systemd/systemd-compat-units.bb      |    4 ----
 .../systemd/systemd-compat-units/machineid.service     |   16 ----------------
 2 files changed, 20 deletions(-)
 delete mode 100644 meta/recipes-core/systemd/systemd-compat-units/machineid.service
meta/recipes-core/systemd/systemd-compat-units.bb +0 -4
index 6eb5ffd..e4d93d2 100644
@@ -19,10 +19,6 @@ do_install() {
 	install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_unitdir}/system
 	ln -sf ../run-postinsts.service ${D}${systemd_unitdir}/system/basic.target.wants/
 	ln -sf ../run-postinsts.service ${D}${systemd_unitdir}/system/sysinit.target.wants/
-
-	install -m 0644 ${WORKDIR}/machineid.service ${D}${systemd_unitdir}/system
-	ln -sf ../machineid.service ${D}${systemd_unitdir}/system/sysinit.target.wants/
-	ln -sf ../machineid.service ${D}${systemd_unitdir}/system/basic.target.wants/
 }
 
 SYSTEMD_DISABLED_SYSV_SERVICES = " \
meta/recipes-core/systemd/systemd-compat-units/machineid.service deleted +0 -16
deleted file mode 100644
index f586c6d..0000000
@@ -1,16 +0,0 @@
-[Unit]
-Description=Machine ID first boot configure
-DefaultDependencies=no
-ConditionPathExists=|!/etc/machine-id
-After=systemd-remount-fs.service
-Before=sysinit.target
-
-[Service]
-ExecStart=/bin/systemd-machine-id-setup
-RemainAfterExit=No
-Type=oneshot
-StandardOutput=syslog
-
-[Install]
-WantedBy=basic.target
-WantedBy=sysinit.target
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH 5/6 systemd: pass --root in prerm if running on host

In reply to Ross Burton

If a systemd image is built without a package manager then packages will be removed from an image during rootfs generation, but without passing --root the systemctl will look on the *host* system.

---
 meta/classes/systemd.bbclass |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/classes/systemd.bbclass +7 -1
index efc1adc..2bd63a4 100644
@@ -38,12 +38,18 @@ fi
 }
 
 systemd_prerm() {
+OPTS=""
+
+if [ -n "$D" ]; then
+    OPTS="--root=$D"
+fi
+
 if type systemctl >/dev/null 2>/dev/null; then
 	if [ -z "$D" ]; then
 		systemctl stop ${SYSTEMD_SERVICE}
 	fi
 
-	systemctl disable ${SYSTEMD_SERVICE}
+	systemctl $OPTS disable ${SYSTEMD_SERVICE}
 fi
 }
 
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH 6/6 systemd: delete files that end up in /var/volatile

In reply to Ross Burton

${localstatedir}/log/journal is created by tmpfiles.d on boot, and the README just causes warnings that /var/volatile isn't empty when mounting on top of it.

---
 meta/recipes-core/systemd/systemd_208.bb |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-core/systemd/systemd_208.bb +3 -3
index c1f8d77..372e73d 100644
@@ -97,9 +97,6 @@ do_install() {
 	ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
 	ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
 
-	# Create dir for journal
-	install -d ${D}${localstatedir}/log/journal
-
 	# Create machine-id
 	# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
 	touch ${D}${sysconfdir}/machine-id
@@ -113,6 +110,9 @@ do_install() {
 		install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
 		sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
 	fi
+
+        # Delete journal README, as log can be symlinked inside volatile.
+        rm -f ${D}/${localstatedir}/log/README
 }
 
 do_install_ptest () {
Signature · 1 line
1.7.10.4