-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install: support old ln versions without the -r option #154
Conversation
There should be some switch in ./configure to detect whether " |
I agree but at the moment I'm focusing on the functionality.
I just submitted an update that uses a shell script to mimic ln -r. It meets that requirement. |
New version, with logic to detect if ln supports -r. |
Makefile.am
Outdated
endif | ||
if ENABLE_BRAILLE | ||
$(LN_S) -f imagetobrf $(DESTDIR)$(pkgfilterdir)/imagetoubrl | ||
$(LN_S) -f imagetobrf $(DESTDIR)$(pkgfilterdir)/imagetoubrlR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this change good for? Looks like a typo.
Makefile.am
Outdated
@@ -1009,7 +1009,7 @@ endif | |||
install-data-hook: | |||
if RCLINKS | |||
for level in $(RCLEVELS); do \ | |||
$(INSTALL) -d -m 755 $(DESTDIR)$(INITDIR)/rc$${level}.d; \ | |||
$(INSTALL) -d -m 755 $(DESTDIR)$(INITDIR)/rc$${level}.d; \R |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this change good for? Looks like a typo.
Thank you for the update. I have added 2 comments to your commit. There seem to be random typos in it. |
Fixes #49. |
Oldish enterprise-class Linux distributions have outdated versions of coreutils whose ln command do not support the -r option. Also non-Linux systems like FreeBSD don't support that option. Use a shell script that mimics the missing functionality. The script creates minimalist relative paths, like ln -r does, but in order to simplify the logic, it requires that the arguments be absolute paths and do not end with '/'. This is enough for our purposes. Add configuration logic to detect if ln supports the -r option, based on the logic used by Autoconf to check if ln supports the -s option. Signed-off-by: Carlos Santos <unixmania@gmail.com>
On Wed, Sep 18, 2019 at 5:01 AM Till Kamppeter ***@***.***> wrote:
Thank you for the update. I have added 2 comments to your commit. There seem to be random typos in it.
Fixed
…--
Carlos Santos <unixmania@gmail.com>
|
Thank you very much for your contribution. I have merged it now. |
The patch used previously to support versions of ln lacking the '-r' option generated broken links: $ file target/usr/lib/cups/backend/driverless target/usr/lib/cups/backend/driverless: broken symbolic link to ../../usr/lib/cups/driver/driverless Add a squashing of two patches already applied upstream that provide a better solution: OpenPrinting/cups-filters#154 OpenPrinting/cups-filters#157 Signed-off-by: Carlos Santos <unixmania@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
The patch used previously to support versions of ln lacking the '-r' option generated broken links: $ file target/usr/lib/cups/backend/driverless target/usr/lib/cups/backend/driverless: broken symbolic link to ../../usr/lib/cups/driver/driverless Add a squashing of two patches already applied upstream that provide a better solution: OpenPrinting/cups-filters#154 OpenPrinting/cups-filters#157 Signed-off-by: Carlos Santos <unixmania@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commit f80ec79) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The patch used previously to support versions of ln lacking the '-r' option generated broken links: $ file target/usr/lib/cups/backend/driverless target/usr/lib/cups/backend/driverless: broken symbolic link to ../../usr/lib/cups/driver/driverless Add a squashing of two patches already applied upstream that provide a better solution: OpenPrinting/cups-filters#154 OpenPrinting/cups-filters#157 Signed-off-by: Carlos Santos <unixmania@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commit f80ec79) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The patch used previously to support versions of ln lacking the '-r' option generated broken links: $ file target/usr/lib/cups/backend/driverless target/usr/lib/cups/backend/driverless: broken symbolic link to ../../usr/lib/cups/driver/driverless Add a squashing of two patches already applied upstream that provide a better solution: OpenPrinting/cups-filters#154 OpenPrinting/cups-filters#157 Signed-off-by: Carlos Santos <unixmania@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commit f80ec79) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Oldish enterprise-class distributions have too old versions of
coreutils, with ln not supporting -r.
So we fake it.
ln -r would create minimalist relative paths, but they are not
trivial to generate. Instead, we always create paths relative to the
root, i.e.:
would create: /usr/sbin/foo -> ../bin/foo
while we do : /usr/sbin/foo -> ../../usr/bin/foo
Signed-off-by: Olivier Schonken olivier.schonken@gmail.com