From e4fcb0dd0f0f8763a3bf475cd2b1e18dfbb4d256 Mon Sep 17 00:00:00 2001 From: Luo Jinghua Date: Mon, 25 Oct 2010 10:11:26 +0800 Subject: Added a patch to mount / as read only --- sys-apps/systemd/Manifest | 8 ++++--- .../files/0001-fixup-xdm.service-for-gentoo.patch | 6 ++--- .../files/0002-never-umount-lib-rc-init.d.patch | 10 ++++---- ...entoo-set-default-sysvinitd-to-etc-init.d.patch | 28 ++++++++++++++++++++++ ...mount-points-as-read-only-unconditionally.patch | 28 ++++++++++++++++++++++ sys-apps/systemd/systemd-9999.ebuild | 4 ++++ 6 files changed, 73 insertions(+), 11 deletions(-) create mode 100644 sys-apps/systemd/files/0003-gentoo-set-default-sysvinitd-to-etc-init.d.patch create mode 100644 sys-apps/systemd/files/0004-umount-all-mount-points-as-read-only-unconditionally.patch diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest index 2440e6c..ce66aca 100644 --- a/sys-apps/systemd/Manifest +++ b/sys-apps/systemd/Manifest @@ -1,4 +1,6 @@ -AUX 0001-fixup-xdm.service-for-gentoo.patch 724 RMD160 0b2f3fced5fd03175f5fc27bb74c56488e9836d7 SHA1 509ad0cd0e85956718ad711a514f52220419ccdd SHA256 728344abe7b9f7ca44bd27187397ca57a060a0a554ffb5c57f3b3554e102f8ca -AUX 0002-never-umount-lib-rc-init.d.patch 803 RMD160 8a72e1c1c63da8ec7900b3630e65970a6b5b38b1 SHA1 18aa1e23160c20c707abb8ced140ec3eae6ddbdd SHA256 3867d3f2ee00f98af90e3788a1985df280ee4935b93fb2bbb61a486a3536bf83 -EBUILD systemd-9999.ebuild 1655 RMD160 a1e5f68bf0cfb20aeb1cb77c60b72d960a53f4ff SHA1 1863b7e93b824f7cab48753ecb1f8f9ee3d7673b SHA256 ff896a04e6bbed4ac4ea4b2ca473163604a978a617812352ab6b986cc0628445 +AUX 0001-fixup-xdm.service-for-gentoo.patch 724 RMD160 e0fe38fc93fd678a06c34ce91694e278d4a56503 SHA1 5e402fd5c0c0bb908d95262f96e7af98ce5641e3 SHA256 ae81de07146b571b993a821fdddb2dda7d25b7c306ab0681b7eb70071bb5912b +AUX 0002-never-umount-lib-rc-init.d.patch 803 RMD160 6e62d9631496984ff8b7c8938e279f1f43439ce8 SHA1 5a377c49813fb390022cde987acbbf528b7a3f55 SHA256 eccc3ba9ea0172bf6a7eae8ad9b823275b3e7a319a1688f22a452f649ba8c310 +AUX 0003-gentoo-set-default-sysvinitd-to-etc-init.d.patch 941 RMD160 f04619d3119be124bb1c3bf0a5a746f4562fe267 SHA1 d3c89264a0da46a14af414705fa0cf2bb7e549c4 SHA256 dd27231e7c239d6825b0d7373716b42ac35e53b5463bc95a63c249184a3dce4d +AUX 0004-umount-all-mount-points-as-read-only-unconditionally.patch 788 RMD160 03094108f1cb51c5144bd2e9591d313b5954dd82 SHA1 13ebf6c2da2dffb0d3f46478ea0f1f7e4b58eb4e SHA256 04499173a0af6758a5e7cc8809649334851d485e0d150fb4e736353228253a5a +EBUILD systemd-9999.ebuild 1688 RMD160 3776c4fe990547cb684a90baece0c36148eddd9f SHA1 a744eb9410f49161a7098b521805d7b4b53433fb SHA256 f43afffb8939e9bffc449d191114edf8860595e26b5d65b33f20ce69b39ced7a MISC metadata.xml 285 RMD160 a394b62e33a5c004c74938e8105bd29b135dc6bc SHA1 672d2415dd51ce2c12c36c659c7926a9b2345fed SHA256 0d6905daec8d05c9a874142bfcc3084691ba54df9328d04bd7dd5a9f64ff4c54 diff --git a/sys-apps/systemd/files/0001-fixup-xdm.service-for-gentoo.patch b/sys-apps/systemd/files/0001-fixup-xdm.service-for-gentoo.patch index 10347f6..cc89f8c 100644 --- a/sys-apps/systemd/files/0001-fixup-xdm.service-for-gentoo.patch +++ b/sys-apps/systemd/files/0001-fixup-xdm.service-for-gentoo.patch @@ -1,7 +1,7 @@ -From e37cc814161ae420bdb20f84a5e64499be3d5d24 Mon Sep 17 00:00:00 2001 +From 240b47bb4edb5496a51c82904a32f95022ebedb0 Mon Sep 17 00:00:00 2001 From: Luo Jinghua Date: Sat, 16 Oct 2010 13:18:29 +0800 -Subject: [PATCH 1/2] fixup xdm.service for gentoo +Subject: [PATCH 1/4] fixup xdm.service for gentoo --- units/gentoo/xdm.service | 4 +++- @@ -26,5 +26,5 @@ index b94c6a8..fd387b1 100644 [Install] Alias=display-manager.service -- -1.7.3.1 +1.7.3.2 diff --git a/sys-apps/systemd/files/0002-never-umount-lib-rc-init.d.patch b/sys-apps/systemd/files/0002-never-umount-lib-rc-init.d.patch index c0f9cc3..ee37db0 100644 --- a/sys-apps/systemd/files/0002-never-umount-lib-rc-init.d.patch +++ b/sys-apps/systemd/files/0002-never-umount-lib-rc-init.d.patch @@ -1,17 +1,17 @@ -From 1e0bffb999e8a6097596a8917d71cf1daec135df Mon Sep 17 00:00:00 2001 +From a35789d9cb93a5e9a070e7d472b0afad85aa0edb Mon Sep 17 00:00:00 2001 From: Luo Jinghua Date: Sat, 16 Oct 2010 13:42:01 +0800 -Subject: [PATCH 2/2] never umount /lib/rc/init.d +Subject: [PATCH 2/4] never umount /lib/rc/init.d --- src/mount.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/mount.c b/src/mount.c -index bbc29d8..389c0ca 100644 +index 3fc0f13..ec4e1ce 100644 --- a/src/mount.c +++ b/src/mount.c -@@ -956,6 +956,12 @@ static int mount_stop(Unit *u) { +@@ -957,6 +957,12 @@ static int mount_stop(Unit *u) { m->state == MOUNT_REMOUNTING_SIGTERM || m->state == MOUNT_REMOUNTING_SIGKILL); @@ -25,5 +25,5 @@ index bbc29d8..389c0ca 100644 return 0; } -- -1.7.3.1 +1.7.3.2 diff --git a/sys-apps/systemd/files/0003-gentoo-set-default-sysvinitd-to-etc-init.d.patch b/sys-apps/systemd/files/0003-gentoo-set-default-sysvinitd-to-etc-init.d.patch new file mode 100644 index 0000000..62cc1e5 --- /dev/null +++ b/sys-apps/systemd/files/0003-gentoo-set-default-sysvinitd-to-etc-init.d.patch @@ -0,0 +1,28 @@ +From 114b2a1ab3c68b0177f490cda4babfbe638b184d Mon Sep 17 00:00:00 2001 +From: Luo Jinghua +Date: Sun, 24 Oct 2010 15:05:28 +0800 +Subject: [PATCH 3/4] gentoo: set default sysvinitd to /etc/init.d + +And set sysvrcd to /etc/runlevels too. +--- + configure.ac | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 4f22b1b..7dce60b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -316,8 +316,8 @@ case $with_distro in + M4_DISTRO_FLAG=-DTARGET_ARCH=1 + ;; + gentoo) +- SYSTEM_SYSVINIT_PATH= +- SYSTEM_SYSVRCND_PATH= ++ SYSTEM_SYSVINIT_PATH=/etc/init.d ++ SYSTEM_SYSVRCND_PATH=/etc/runlevels + SPECIAL_SYSLOG_SERVICE=syslog-ng.service + AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo]) + M4_DISTRO_FLAG=-DTARGET_GENTOO=1 +-- +1.7.3.2 + diff --git a/sys-apps/systemd/files/0004-umount-all-mount-points-as-read-only-unconditionally.patch b/sys-apps/systemd/files/0004-umount-all-mount-points-as-read-only-unconditionally.patch new file mode 100644 index 0000000..9a1568e --- /dev/null +++ b/sys-apps/systemd/files/0004-umount-all-mount-points-as-read-only-unconditionally.patch @@ -0,0 +1,28 @@ +From 95633c83c2b8642252e7038f332914191ff8b0b0 Mon Sep 17 00:00:00 2001 +From: Luo Jinghua +Date: Sun, 24 Oct 2010 23:15:16 +0800 +Subject: [PATCH 4/4] umount all mount points as read only unconditionally + +--- + src/umount.c | 5 +---- + 1 files changed, 1 insertions(+), 4 deletions(-) + +diff --git a/src/umount.c b/src/umount.c +index ca4dbc2..62881a0 100644 +--- a/src/umount.c ++++ b/src/umount.c +@@ -521,10 +521,7 @@ int umount_all(bool *changed) { + if (r < 0) + goto end; + +- r = mount_points_list_umount(&mp_list_head, changed); +- if (r <= 0) +- goto end; +- ++ mount_points_list_umount(&mp_list_head, changed); + r = mount_points_list_remount_read_only(&mp_list_head, changed); + + end: +-- +1.7.3.2 + diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild index 5ee829f..2248d82 100644 --- a/sys-apps/systemd/systemd-9999.ebuild +++ b/sys-apps/systemd/systemd-9999.ebuild @@ -38,6 +38,10 @@ DEPEND="${RDEPEND} CFLAGS+=" -g -O0" WANT_AUTOMAKE=1.11 +pkg_setup() { + enewgroup lock +} + src_unpack() { git_src_unpack } -- cgit v1.2.3