Can piclone be used in a RPi installation of Endeavouros?

I agree totally. Someone needs to contact the Maintainer

The PKGBUILD in line 1 lists this person as the maintainer
# Maintainer: Frede Hundewadt <fh@uex.dk>

Whilst the AUR page has the following as Maintainer

Submitter: linux-aarhus
Maintainer: linux-aarhus
Last Packager: linux-aarhus
Votes: 1
Popularity: 0.000000

Since it has been ignored for 1 1/2 years, with only 1 vote, and Popularity of 0, I think this is a big ask to get it fixed.

Pudge

I have an AUR account and can hit the “Flag package out-of-date” button if nobody else has an account at the moment.

That would be great to flag it as out-of-date!

Many moons ago, I applied to get an AUR account but never got it so your help would be appreciated.

Pudge

Done. Let’s see if the previous maintainer still responds to the ping.

PS: Happy belated birthday

Let’s see if I can flag it too

IIRC (from my Manjaro days) real name is Frede.

Could it be this one maybe (is also in this topic).

Let’s be careful, no need to chase identities down the online rabbit hole. Someone shared a package on the AUR, in an ideal situation they maintain it for a long time, but in the end it’s also a “no strings attached”-situation. A ping just went out, but if they don’t (want to) react that totally fine too.

Well I noticed the fox , that also showed up in the linked Manjaro topic (3 years ago though), and found it a bit strange that is all, no strings attached I guess :grinning_face:

That is true - and I am running Manjaro as my primary OS on the edge branch (unstable).

I don’t use the piclone utility, it was an experiment back in the days when there was a request on Manjaro Forum.

As maintainer of the AUR script, I have updated the PKGBUILD.

The changes has not yet been pushed to AUR.

I have tested on a rpi5 and it builds and it can run - so I am assuming it work as expected.

Before I push the changes - will you please validate if I got it right?

pkgname=piclone-git
_pkgname=piclone
pkgver=r160.8b9c6c6
pkgrel=1
pkgdesc="Raspberry Pi system clone utility"
arch=(x86_64 i686 armv7h aarch64)
url="https://github.com/raspberrypi-ui/piclone"
license=(GPL2)
depends=(gtk3 glib2 parted dosfstools e2fsprogs coreutils util-linux zenity dbus gvfs)
makedepends=(git intltool meson cmake wayland-protocols)
source=("git+https://github.com/raspberrypi-ui/piclone.git")
sha256sums=('SKIP')

pkgver() {
    cd piclone
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd ${srcdir}/${_pkgname}
    if [[ -d builddir ]]; then
        rm -r ./builddir
    fi
    meson setup builddir --prefix=/usr
}

build() {
    cd ${srcdir}/${_pkgname}/builddir
    meson compile
}

package() {
    local builddir=${srcdir}/${_pkgname}/builddir
    install -D -t "${pkgdir}/usr/share/applications" ${builddir}/data/piclone.desktop
    install -D -t "${pkgdir}/usr/share/${_pkgname}" ${srcdir}/${_pkgname}/data/piclone.ui
    install -D -t "${pkgdir}/usr/bin" ${builddir}/src/piclone
    install -d "${pkgdir}/usr/share/locale"
    cp -r ${builddir}/po/* ${pkgdir}/usr/share/locale
}

EDIT:
I should also remember to thank you for notifying me of the changes in the build system :+1:

Thank you for your assistance on this. It is appreciated.

When I see that the updates are in the AUR, I will test it on a RPi 4b.

Pudge

Builds and starts fine here (x86, no actual copying tested). :+1:

@anon95074228 I used your PKGBUILD listed above and used makepkg to compile it on a RPi 4b.

It compiled and started OK. I will try complete a backup after dinner.

Pudge

Everything below was on a RPi 4b 8 GB RAM fresh install with KDE Plasma

I was able to choose the From drive and the To drive.

While choosing the drives, these warnings and/or notifications appeared in the terminal window:

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

Then when I started the backup, I got these errors:

sh: line 1: uuid: command not found
sudo: unable to run /usr/bin/sudopwd: No such file or directory
sudo: no password was provided
sudo: a password is required
sh: line 1: uuid: command not found
sudo: unable to run /usr/bin/sudopwd: No such file or directory
sudo: no password was provided
sudo: a password is required
[don@RPi-4b ~]$

Since it was asking for a password, I tried using “sudo piclone” and got this:

[don@RPi-4b ~]$ sudo piclone
[sudo] password for don: 

(piclone:2428): GLib-GIO-CRITICAL **: 17:24:17.836: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(piclone:2428): GLib-GIO-CRITICAL **: 17:24:17.836: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

(piclone:2428): GLib-GIO-CRITICAL **: 17:24:17.836: g_dbus_connection_close_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(piclone:2428): GLib-GObject-CRITICAL **: 17:24:17.836: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Pudge

Everything below was on a RPi 5 16 GB RAM fresh install with Cosmic.

The RPi 5 / Cosmic coimbination was cleaner and smoother graphics when selecting Copy From and Copy To and did not create any warnings / notifications in the terminal window.

When I pressed the Start button, I got


and the following in the terminal window:

sh: line 1: uuid: command not found
sudo: unable to run /usr/bin/sudopwd: No such file or directory
sudo: no password was provided
sudo: a password is required

I think that the Cosmic DE did a better job with the graphics than Plasma DE did so I assume piclone uses GTK.

Pudge

I am thinking the piclone sources needs patching to use uuidgen from util-linux or one could create a symlink named uuid pointing to uuidgen.

Also the sudopwd does not exist anywhere in the Arch Linux eco-system and I cannot immediately think of where it originates.

I searched for debian sudopwd and stumbled upon this https://forums.raspberrypi.com/viewtopic.php?t=385670

You assume correct.

The user interface is stored as /usr/share/piclone/piclone.ui

EDIT:

I located a package https://archive.raspberrypi.com/debian/pool/main/s/sudopwd/sudopwd_0.3_arm64.deb which contains a binary named sudopwd

EDIT:

I have experimented with the package and I can build a package and incorporate the sudopwd utility just fine - either building from source or using the debian package - but the final package will not authenticate.

I have found that sudopwd provides the entered password back in clear text and as such it is similar to the zensu project which is a simple wrapper script but it will not work either.

I am thinking the piclone utility has some debian specific assumptions - and I don’t have the knowledge required to figure out what that is - sorry about that…

At the current state - I have no option but to request a removal of the PKGBUILD from AUR.

The shrink-backup script mentioned above is viable option on an Arch based system.

Can piclone be used in a RPi installation of Endeavouros? - #18 by Root

I understand this completely. Thank you for looking into this. Your efforts are appreciated.

Pudge

The revised PKGBUILD which incorporates a build of sudopwd

pkgname=piclone-git
pkgver=r160.8b9c6c6
pkgrel=1
pkgdesc="Raspberry Pi system clone utility"
arch=(x86_64 i686 armv7h aarch64)
url="https://github.com/raspberrypi-ui/piclone"
license=(GPL2)
depends=(gtk3 glib2 parted dosfstools e2fsprogs coreutils util-linux zenity dbus gvfs)
makedepends=(git intltool meson cmake wayland-protocols)
# uncomment to add the install script
#install=piclone.install
source=(
    "git+https://github.com/raspberrypi-ui/piclone.git"
    "https://archive.raspberrypi.com/debian/pool/main/s/sudopwd/sudopwd_0.3.tar.xz"
    )

sha256sums=('SKIP'
            'd4989ff0ea15ce4b0bc53f9b5b04fba96e003865eb7a9d6b75228f98c56c3d31')

pkgver() {
    cd piclone
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    # piclone
    cd "${srcdir}/piclone"
    if [[ -d builddir ]]; then
        rm -r ./builddir
    fi
    meson setup builddir --prefix=/usr

    # sudopwd
    cd "${srcdir}/sudopwd"
    if [[ -d builddir ]]; then
        rm -r ./builddir
    fi
    meson setup builddir --prefix=/usr
}

build() {
    # piclone
    cd ${srcdir}/piclone/builddir
    meson compile

    # sudopwd
    cd ${srcdir}/sudopwd/builddir
    meson compile
}

package() {
    local piclone_src="${srcdir}/piclone"
    local sudopwd_src="${srcdir}/sudopwd"
    # install piclone files
    install -D -t "${pkgdir}/usr/share/applications" ${piclone_src}/builddir/data/piclone.desktop
    install -D -t "${pkgdir}/usr/share/piclone" ${piclone_src}/data/piclone.ui
    install -D -t "${pkgdir}/usr/bin" ${piclone_src}/builddir/src/piclone
    install -d "${pkgdir}/usr/share/locale"
    cp -r ${piclone_src}/po/* ${pkgdir}/usr/share/locale

    # install sudopwd files
    install -D -t "${pkgdir}/usr/bin" ${sudopwd_src}/builddir/src/sudopwd
    install -D -t "${pkgdir}/usr/share/sudopwd" ${sudopwd_src}/src/sudopwd.ui
    install -D -t "${pkgdir}/usr/share/applications" ${sudopwd_src}/data/sudopwd.desktop
}

As noted above the uuid binary called in the source is not found on Arch Linux. A workaround is to symlink uuidgen as uuid

sudo ln -s /usr/bin/uuidgen /usr/bin/uuid

Technically one could (should) add a piclone.install to create a symlink to uuidgen binary but as I will no longer maintain the PKGBUILD I have not done so.

Sample piclone.install script to create the uuid symlink to uuidgen

post_install() {
	ln -s /usr/bin/uuidgen /usr/bin/uuid
}

post_remove() {
	rm /usr/bin/uuid
}

Remember to run updpkgsums or makepkg --geninteg and update the sha256sums array.

EDIT

It turns out I was wrong… I was confused by the sheer number of times I was challenged to authorise the app.

The final package works - with the caveat that it will ask for password for every privileged action and this is quite a lot…

  • the app creates new partitions on the target device
  • it formats the partitions
  • it mounts an existing partition to a temporary mount
  • it mounts the target partition to a temporary mount

All of these actions will require the operator to provide the authorisation using sudopwd.

I am thinking the reason it does so on an Arch Linux system is related to the fact that a Raspberry Pi OS has a sudo configuration that allows the app to run without the need to ask for permissions for every action.

Yet another reason to use the shrink-backup script linked above…

I have updated the AUR source with the changes - but as I have no desire to continue maintenance - the delete request still stands…

EDIT:

Curiosity…

Looking into how a pi desktop is constructed - I realise it uses wayland, hence the added builddep on wayland-protocols.

But my test sd card is running an old barebone Manjaro with lxqt desktop added and it is using X11 - I think the PKGBUILD dependencies needs a cleanup.

EDIT:
Do you have a download location for EndeavourOS ARM running on Wayland?

Don’t bother - I found it https://github.com/endeavouros-arm/images/releases

EDIT:

After testing using latest image and setting up Plasma - the piclone utility fails to copy the sd-card.

I appears the utility expects/requires the source partition table to be MSDOS style and therefore it refuses to work.

Yet another reason to use the shrink-backup script.

I also think that is the best solution.
Thank you for your time and efforts.

Pudge

Just a note to Root: I guess I was probably the Manjaro user who sought assistance to be able to use piclone, It worked perfectly for all the time (3 years or so) I used the distro, and was vital at one stage where the microSD card in the Pi became corrupted, and I lost the OS and all my own data. The availability of a recently cloned backup meant that I was able to get back with a working OS and 99% of the data. Thanks for that.