openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
822 stars 251 forks source link

Duplicate openhab package repo on new install #1573

Closed mstormi closed 1 year ago

mstormi commented 3 years ago
#[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
ecdye commented 3 years ago

@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.

mstormi commented 3 years ago

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 commented 3 years ago

@BClark09 Ben have you seen Ethan's question ?

BClark09 commented 3 years ago

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.

mstormi commented 3 years ago

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?

BClark09 commented 3 years ago

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}
mstormi commented 3 years ago

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 ?

ecdye commented 3 years ago

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?

mstormi commented 3 years ago

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 commented 2 years ago

@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

BClark09 commented 2 years ago

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.

mstormi commented 2 years ago

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 commented 2 years ago

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
BClark09 commented 2 years ago

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.

mstormi commented 1 year ago

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