-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
new backuppc package w/ dependency perl-file-rsyncp #5886
Conversation
Hi, Compilation was successful for raspberry PI 1 but during installation on target platform I have:
|
Hi,
@kofec: There is something wrong with your perl installation. Cwd.so is from perlbase-cwd and should be loadable by the perl it has been built against. Are you sure your perl packages are consistently installed from one source? |
@nonicknamewasleftforme
|
I have asked on forum: |
It looks like I have resolved issue with perl - I just include the package backuppc to image and the perl is also included as dependency. I have new issue: |
After reinstall:
|
My bet would be you tried to run /usr/share/backuppc/bin/BackupPC directly from a root shell? You're supposed to use the init script, which runs it as user backuppc.
And now you have files lying around that are owned by root and cannot be overwritten when the init script is called through the package reinstall. Please try: |
Hi,
That is why after upgrade the whole image with Backuppc integrated I have issue with rights. But the question is why postinstall was not run ? |
Oh, OK! You're right, the buildroot calls mksquashfs with -root-owned. So changing file/directory ownership in postinstall of opkg has no effect in that case. Bummer. Thanks for catching this. |
Hi, After try I see 2 issues:
1 - Password was change |
I have add missing perl package so only issue with password changing left:
|
e96fef3
to
34ea53b
Compare
I've added the dependency on perlbase-getopt. Hopefully, this was the last missing one.
I don't know, why. It doesn't happen on my device. The init script checks for an existing user "backuppc" in /etc/httpd.conf. Does that exist on yours? |
root@RpiTestowe:~# cat /etc/httpd.conf |
Ok I found why. The file is not backup during upgrade:
|
Thanks again! I've added a file /lib/upgrade/keep.d/backuppc to the package to improve on that. |
When I want to use rsync I have issue:
And I have to install:
|
yes, I have now also systematically scanned RsyncP for dependencies and included them in the Makefile. I think I have missed so many dependencies, because my build contains "shorewall", which satisfies a lot of them. Thank you for bearing with me. |
After upgrade I lost whole configuration - all define hosts are lost |
Are the host configuration files (/data/backuppc/conf/$hostname.pl) really gone? Also, what does $(sysupgrade -l | grep backuppc) tell you? Maybe just the file /data/backuppc/conf/hosts was overwritten with the one from the package? This doesn't happen when upgrading the package with opkg. Maybe the behavior is different again when using a sysupgrade image. |
What is the status of this? |
Well, kofec's last issue I cannot reproduce (the sysupgrade config seems to work for me (tm)) and everything else he reported was fixed. So I think these packages are at least "good enough". |
I suggest squashing commits as it makes it easier to review. One commit per package. |
Thank you for the review! I applied all your suggestions. When I do rebase/squash should I add your "Reviewed-by"? |
Sure |
packages/admin/backuppc/Makefile Line 38 in 5a4245b
Change PKG_BUILD_DIR instead of shuffling it around |
Weird. I seem to remember that this didn't work because of the uppercase letters in the Path. Something must have changed for me, because now it works. I've included the change in the squashed commits I just force-pushed. |
Signed-off-by: Carsten Wolff <[email protected]> Reviewed-by: Rosen Penev <[email protected]>
admin/backuppc/files/backuppc.init
Outdated
# ownerships other than root are lost. | ||
preconfigure() { | ||
# create backuppc group and user if needed | ||
source /lib/functions.sh |
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.
This should be placed before START. See https://github.com/openwrt/packages/blob/master/utils/lxc/files/lxc-auto.init for an example. source throws a warning in shellcheck: SC2039: In POSIX sh, 'source' in place of '.' is undefined.
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.
done
admin/backuppc/files/backuppc.init
Outdated
# inform user | ||
echo | ||
echo "To protect access to the backuppc web interface, HTTP basic authentication in" | ||
echo "uhttpd for http://${HOSTNAME}/cgi-bin/BackupPC_Admin has been configured:" |
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.
This throws a warning in shellcheck: SC2039: In POSIX sh, HOSTNAME is undefined.
I don't know if this applies to busybox sh. If it does, there's probably some function in /lib/functions.sh or network.sh
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.
I don't know about this one. $HOSTNAME exists in both ash and bash and I've seen it being used in other packages. I've found nothing in /lib and the "hostname" command doesn't exist in openwrt. The only alternative would be to read it from /proc directly, but this doesn't look less ugly to me.
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.
Reading from proc is what cifsd-tools does. It's nice to shut up shellcheck.
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.
OK, I've changed it to use uci to fetch the configured hostname.
Signed-off-by: Carsten Wolff <[email protected]> Reviewed-by: Rosen Penev <[email protected]>
This is overdue. Merging. |
Maintainer: me
Compile tested: Marvell Armada, WRT1200AC, master
Run tested: Marvell Armada, WRT1200AC, LEDE 17.01, ran successfully in production for a while
Description:
This branch adds two new packages: backuppc and perl-file-rsyncp, which is needed for the rsync xfer method in backuppc. The backuppc packaging uses ideas from debian's packaging to make things work.
BackupPC is a high-performance, enterprise-grade system for backing up Linux and WinXX PCs and laptops to a server's disk: http://backuppc.sourceforge.net/info.html
The packaging uses a separate user "backuppc" to run the daemon and the web interface. It supports uhttpd and configures HTTP basic auth for the web interface automatically, when uhttpd is used.