openhabian icon indicating copy to clipboard operation
openhabian copied to clipboard

Duplicate openhab package repo on new install

Open mstormi opened this issue 3 years ago • 14 comments

#[16:03:33] root@openhab-test:/etc/apt/sources.list.d# more op*
::::::::::::::
openhab-linuxpkg.list
::::::::::::::
# Provided by the openhab Linux package.
# There are three repository types:
## - stable: contains the latest official release with tested features.
## - testing: contains new features that are currently in the testing phase (mil
estone and release candidates).
## - unstable: contains the latest changes which may be untested or have bugs.

deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main
::::::::::::::
openhab.list
::::::::::::::
deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifac
tory/openhab-linuxpkg stable main

mstormi avatar Aug 26 '21 14:08 mstormi

@BClark09 Is this a change on your end that caused this to appear because there wasn't a change here that could have caused it.

ecdye avatar Aug 26 '21 16:08 ecdye

just wanted to ask the same. I couldn't find anything in a recent first-boot.log that explains where the openhab-linuxpkg.list comes from.

mstormi avatar Aug 26 '21 16:08 mstormi

@BClark09 Ben have you seen Ethan's question ?

mstormi avatar Aug 30 '21 20:08 mstormi

Hi both, sorry I've been away:

The change is indeed caused by changes in the Stable package from April: https://github.com/openhab/openhab-linuxpkg/pull/200. Do you get the notifications to @openhab/openhabian-maintainers ?

The change was implemented so that users would still have a source file that contained a vaild location when we moved from Bintray to Artifactory for stable installs.

BClark09 avatar Aug 31 '21 01:08 BClark09

Yes I receive them (at least I think I do but cannot test myself :)).

So your stable package creates a repo file ? openHABian needs to create repo files itself because it has to put them up when a user chooses release/milestone/snapshot before we pull the package from the repo. How should we treat that, then. Remove yours after install ? Is it for stable only ? Is that really needed in the package or could you undo that?

mstormi avatar Aug 31 '21 08:08 mstormi

Ultimately, I think it would be best handled by the package itself, wdyt? I have been thinking of a simple way of installing the package for the first time or after a major change (like a sudden host change) for non-openhabian users. Many packages do this by instructing the user to download and install the .deb file and the post script installs the .list and key file for you.

This simplifies worst case install or upgrade to a couple of lines for anyone using the Linux package.

wget ${FILE_URL} -O ${FILE_NAME}
apt install ./${FILE_NAME}

BClark09 avatar Aug 31 '21 16:08 BClark09

But then how do you distinguish and choose the packages for release / milestone / snapshot ? And that would only work if they're all in the same repo, no ?

mstormi avatar Aug 31 '21 16:08 mstormi

At the very least, @mstormi can I ask a clarifying question? Is the existence of the duplicated package repo going to cause any major issues in the short term while we figure out the best way to resolve the issue?

ecdye avatar Sep 01 '21 14:09 ecdye

I don't think it's a major issue for now. Just some users to complain about apt giving warnings because of duplicate repo definition.

mstormi avatar Sep 01 '21 16:09 mstormi

@BClark09 Hi Ben, sorry to be disturbing here but to be frank I dislike the current status with duplicate repos and users getting warnings. Do you have any suggestion how to proceed ? Would you be willing to undo that change you made to the pkg ? I think a package should not [pre/post]install the repo it itself is supposed to be dragged from, that's sorta self-referential and barely ever a good idea in the long run in terms of clean code principles. Mind the openHABian requirements in https://github.com/openhab/openhabian/issues/1573#issuecomment-909009872

mstormi avatar Sep 23 '21 10:09 mstormi

We can revert the change if it's causing openHABian issues, but it would be great to have a quicker way of setting up openHAB's linux install or if the signing key has to change, I'd hoped that openHAB is similar to how VS-Code is installed first time for Linux machines.

Sorry, I haven't been very active at the moment. I hope to get back into sorting things out properly but it may be a few weeks yet.

BClark09 avatar Sep 25 '21 14:09 BClark09

We can revert the change if it's causing openHABian issues, but it would be great to have a quicker way of setting up openHAB's linux install or if the signing key has to change

Thanks, please revert then. Not sure about your comment. The predominant install method is openHABian, isn't it? Which checks for updates on any start so if there's a quick need to change repos or keys we can do it that way.

mstormi avatar Sep 25 '21 14:09 mstormi

This is from a current install (of the 1.7 bullseye alpha) so an ongoing issue.

@BClark09 is there leftovers you didn't revert ?

[12:59:22] root@openhabian:/home/openhabian# cd /etc/apt/sources.list.d/
[12:59:26] root@openhabian:/etc/apt/sources.list.d# ls
comitup.list  nodesource.list  openhab-linuxpkg.list  openhab.list  raspi.list  vscode.list
[12:59:26] root@openhabian:/etc/apt/sources.list.d# more openhab-linuxpkg.list
# Provided by the openhab Linux package.
# There are three repository types:
## - stable: contains the latest official release with tested features.
## - testing: contains new features that are currently in the testing phase (milestone and release candidates).
## - unstable: contains the latest changes which may be untested or have bugs.

deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main
[12:59:33] root@openhabian:/etc/apt/sources.list.d# grep artif *
openhab-linuxpkg.list:deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main
openhab.list:deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main
[12:59:42] root@openhabian:/etc/apt/sources.list.d# apt-get update
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Get:3 http://davesteele.github.io/comitup/repo comitup InRelease [3,936 B]
Hit:4 https://deb.nodesource.com/node_14.x bullseye InRelease
Hit:5 https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease
Fetched 18.9 kB in 3s (5,495 B/s)
Reading package lists... Done
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list.d/openhab-linuxpkg.list:7                                                 and /etc/apt/sources.list.d/openhab.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/openhab-linuxpkg.list:7 a                                                nd /etc/apt/sources.list.d/openhab.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/openhab-linuxpkg.l                                                ist:7 and /etc/apt/sources.list.d/openhab.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/openhab-linuxpkg.list                                                :7 and /etc/apt/sources.list.d/openhab.list:1
W: Target Translations (main/i18n/Translation-en_US.UTF-8) is configured multiple times in /etc/apt/sources.list.d/openhab-linu                                                xpkg.list:7 and /etc/apt/sources.list.d/openhab.list:1
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list.d/openhab-linuxpkg.list:7                                                 and /etc/apt/sources.list.d/openhab.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/openhab-linuxpkg.list:7 a                                                nd /etc/apt/sources.list.d/openhab.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/openhab-linuxpkg.l                                                ist:7 and /etc/apt/sources.list.d/openhab.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/openhab-linuxpkg.list                                                :7 and /etc/apt/sources.list.d/openhab.list:1
W: Target Translations (main/i18n/Translation-en_US.UTF-8) is configured multiple times in /etc/apt/sources.list.d/openhab-linu                                                xpkg.list:7 and /etc/apt/sources.list.d/openhab.list:1

mstormi avatar Nov 13 '21 12:11 mstormi

The revert has removed all files but I don't think there's been a new release since then, so the latest stable package still contains it.

BClark09 avatar Nov 20 '21 01:11 BClark09

Haven't encountered in quite a while so I believe it's fixed one way the other. Will reopen if/when there's news.

mstormi avatar Nov 02 '22 14:11 mstormi