From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Resend: Home dir fixup for root in systemd
Date: Wed, 27 Jul 2016 12:43:34 +0200 [thread overview]
Message-ID: <20160727104334.GB31919@pengutronix.de> (raw)
In-Reply-To: <20160727112927.77559959@erd980>
On Wed, Jul 27, 2016 at 11:29:27AM +0200, David Jander wrote:
> On Wed, 27 Jul 2016 11:11:21 +0200
> Artur Wiebe <artur@4wiebe.de> wrote:
>
> > Hi all,
> >
> > to patch systemd to fit some "mistake" in ptxdist seems quite
> > disproportionately.
> >
> > It is much simpler to change home of root to /root by providing own
> > /projectroot/etc/passwd then undoing a patch.
> >
> > Oh, it was just a typo of Michael! Great!
> >
> > Ialsovote for solution 1: set home for root to /root
> >
> > Change PTXdist and all places in it that assume the $HOME=/home for root.
>
> I am also more inclined to solution 1, but I would have agreed to any of both,
> whichever Michael prefers... :-)
>
> Anybody dare to say if there are other packages in the PTXdist universe that
> are (purposefully) configured to use /home?
>
> Doing a "git grep home", I can find these suspicious locations:
>
> ...
> projectroot/etc/apache2/httpd.conf:# UserDir: The name of the directory that is appended onto a user's home
> projectroot/etc/apache2/httpd.conf:#<Directory /home/*/public_html>
> ...
> projectroot/etc/boa/boa.conf:DocumentRoot /home/httpd/html
> projectroot/etc/boa/boa.conf:# UserDir: The name of the directory which is appended onto a user's home
> projectroot/etc/boa/boa.conf:ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/
> ...
This has nothing to do with roots home directory. It's actually better that
there is no overlap.
> projectroot/etc/init.d/startup:[ -x /home/startup ] && /home/startup
This could be changed, but I wouln't do it. It will still work just like
before and this way we won't break it.
> ...
> projectroot/etc/passwd:root:x:0:0:root:/home:/bin/sh
> projectroot/etc/passwd:ftp:x:11:101:ftp user:/home:/bin/false
> projectroot/etc/passwd:www:x:12:102:www user:/home:/bin/false
Only change root here.
> projectroot/etc/proftpd.conf:<Directory /home/*>
> projectroot/etc/samba/smb.conf:[homes]
> projectroot/etc/samba/smb.conf: path = /home
Same as with apache/boa.
> ...
> rules/frodo.make: install -D -m 644 "$(FRODO_DIR)/1541 ROM" "$(FRODO_PKGDIR)/home/1541 ROM"
> rules/frodo.make: install -D -m 644 "$(FRODO_DIR)/Basic ROM" "$(FRODO_PKGDIR)/home/Basic ROM"
> rules/frodo.make: install -D -m 644 "$(FRODO_DIR)/Char ROM" "$(FRODO_PKGDIR)/home/Char ROM"
> rules/frodo.make: install -D -m 644 "$(FRODO_DIR)/Kernal ROM" "$(FRODO_PKGDIR)/home/Kernal ROM"
> rules/frodo.make: @$(call install_copy, frodo, 0, 0, 0644, -, /home/1541 ROM)
> rules/frodo.make: @$(call install_copy, frodo, 0, 0, 0644, -, /home/Basic ROM)
> rules/frodo.make: @$(call install_copy, frodo, 0, 0, 0644, -, /home/Char ROM)
> rules/frodo.make: @$(call install_copy, frodo, 0, 0, 0644, -, /home/Kernal ROM)
> rules/frodo.make: @$(call install_link, frodo, ../etc/frodorc, /home/.frodorc)
This might break, but the errors should be clear in that case. I'm not sure
how many people use it. We just added it for a demo a long time ago.
I'd say, leave it as it is and we'll fix it when someone can actually test
it.
> ...
> rules/ltp-base.make: @$(call install_copy, ltp_base, 0, 0, 0755, /home)
> rules/ltp-base.make: @$(call install_copy, ltp_base, 0, 0, 0755, /home/testcases)
> rules/ltp-base.make: @$(call install_copy, ltp_base, 0, 0, 0755, /home/testcases/bin)
> rules/ltp-base.make: /home/testcases/$$file) \
> rules/ltp-base.make: @$(call install_copy, ltp_base, 0, 0, 0755, /home/testcases/bin/dumpdir)
> rules/ltp-base.make: /home/testcases/$$file) \
> ...
Leave it as it is. This stuff is broken anyways.
> rules/rootfs.in: prompt "/home"
> rules/rootfs.in: home/ is a common location to store users private data. As ptxdist does
> rules/rootfs.make: @$(call install_copy, rootfs, 0, 0, 2775, /home)
This is still valid like this.
> ...
> rules/systemd.make:# # don't touch /etc and /home
Nothing to change here.
> ...
>
> These would at least all need to be patched.
> And that was the only real reason why I thought option 2 might be
> desirable :-)
I think the patch wil be shorter than for option 2 :-)
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2016-07-27 10:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 12:09 David Jander
2016-07-26 13:19 ` Guillermo Rodriguez Garcia
2016-07-26 14:00 ` David Jander
2016-07-26 15:13 ` Ben Stuyts
2016-07-27 5:41 ` David Jander
2016-07-26 17:50 ` Guillermo Rodriguez Garcia
2016-07-27 5:51 ` David Jander
2016-07-27 12:04 ` Guillermo Rodriguez Garcia
2016-07-27 6:55 ` Michael Olbrich
2016-07-27 8:55 ` David Jander
2016-07-27 9:04 ` Michael Olbrich
2016-07-27 9:11 ` Artur Wiebe
2016-07-27 9:29 ` David Jander
2016-07-27 10:43 ` Michael Olbrich [this message]
2016-07-27 11:24 ` David Jander
2016-07-29 8:07 ` Tim Sander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160727104334.GB31919@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox