MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.81k stars 494 forks source link

DietPi Image/zip | Naming system #382

Closed Fourdee closed 8 years ago

Fourdee commented 8 years ago

As suggested by @rhkean :+1:

Img naming:

DietPi_${dietpiversion}_${Board}-${arch}-(${distro}).${file_extension}

Img naming:

DietPi_${Board}-${arch}-(${distro}).${file_extension}

Once all DietPi images have been updated to 120 and 120 is released, I'll go through all files and download links as needed.

note to self: I've created a single page/url for download links, update all references/links to use this: http://dietpi.com/download

Status (Also status for all images updated to v120):

k-plan commented 8 years ago

Hmm,

Don't likeDietPi_${Board}-${arch}-(${distro}).7z. I think, I know, why you like to do this.

Will favorDietPi_${dietpiversion}-${Board}-${arch}-(${distro}).7z and you link on http://dietpi.com/download to DietPi_${Board}-${arch}-(${distro})-{latest}.7z and have a symbolic link to the latest version. So you can leave old version on-line in http://dietpi.com/downloads/images/, please. Don't like to download and unpack only to see if there is a new image version.

Sorry, but only my two penny worth ...

rhkean commented 8 years ago

my only concern was that the x64 images have the arch after the board name, but the arm64 images have it after the distro

Fourdee commented 8 years ago

I think, I know, why you like to do this.

Quicker to create the images lol :)

Will favorDietPi${dietpiversion}-${Board}-${arch}-(${distro}).7z and you link on http://dietpi.com/download to DietPi${Board}-${arch}-(${distro})-{latest}.7z and have a symbolic link to the latest version.

I agree with the addition of version numbers for .7z files. Then we can just give users the link (as you mentioned) above to download the latest version.

So you can leave old version on-line in http://dietpi.com/downloads/images/

Although a good idea, I'd like to ensure the user always downloads the "latest" image where possible. We dont want users downloading v90 and having to update 30+ DietPi versions. The shorter the installation and update for the user, the better. There is also the support/time issue. If we provider older DietPi image downloads, aswell as the current ones, we would need to fully support all image releases, as well as the entire dietpi-software catalog, for eternity. I'd love to be able to do that, but we need to be realistic, a prime example is the OPi PC image that I recently changed to ARMbian due to the security exploit. If we provide the previous Loboris image that contains the exploit, we deserve a slap in the face :)

So from where I look at it:

k-plan commented 8 years ago

Wow, one suggestion and so keenly reactions. :smile:

Sorry, no hard feelings for just anybody.

@rhkean

Hmm, Don't likeDietPi_${Board}-${arch}-(${distro}).7z.

my only concern was that the x64 images have the arch after the board name, but the arm64 images have it after the distro

Yes, my first phrase was a little bit short and harsh. I personally only miss the version-no. in packed file name. But you are right with the architecture mark, it was inconsistent.

@Fourdee

I agree with the addition of version numbers for .7z files. Then we can just give users the link (as you mentioned) above to download the latest version.

Nice, thank you. :+1: :smiley:

And I respect your reasons, to not provide outdated images any more. It's more then okay for me.

rhkean commented 8 years ago

@k-plan No hard feelings.... I didn't take anything harshly at all. :smile:

I've been so swamped at work that I'm sure my comments have probably also come across as short and/or harsh. And, if so, I apologize.

All just open discussion as far as I can tell. :+1:

Fourdee commented 8 years ago

@k-plan @rhkean "Love is in the air" :dancer: :dancers: lol

All jokes aside (sorry, couldn't resist lol). All feedback is good feedback. Helps make DietPi better, so :+1: :+1: to both of you :)

Fourdee commented 8 years ago

@k-plan

New .7z file naming + images. image

@rhkean I changed aarch64 to arm64. I think it works better with the other arm32 archs armv[0-9], what you think?

rhkean commented 8 years ago

I don't have a preference. I only used aarch64 to be consistent with #341

Will you include links for "latest"? DietPi_latest_PineA64-arm64-(Jessie).7z --> DietPi_v120_PineA64-arm64-(Jessie).7z

Fourdee commented 8 years ago

@rhkean Prior to v120 release, i've uploaded them to: http://dietpi.com/downloads/testing/

DietPi_latest_PineA64-arm64-(Jessie).7z --> DietPi_v120_PineA64-arm64-(Jessie).7z

Yep, i'll maintain the version URL links on webpage: http://dietpi.com/download The above URL is now "the main link/place for users to download DietPi".

I updated all the forum links today to point to http://dietpi.com/download: http://dietpi.com/phpbb/viewtopic.php?f=8&t=9

Note to self: Update sourceforge files for mirror.

rhkean commented 8 years ago

so, will I be able to do this in a script?

strTestingPath=""
if (( ${bTesting} )); then
    strTestingPath="/testing"
fi
strDownloadBaseURL="http://dietpi.com/downloads${strTestingPath}"
strDownloadFile="DietPi_latest_${strTargetBoard}-${arch}-(Jessie).7z"
strDownloadURL="${strDownloadBaseURL}/${strDownloadFile}"
wget "${strDownloadURL}"

or should I add a piece of code that pulls the version number from github?

Fourdee commented 8 years ago

@rhkean

will I be able to do this in a script?

I usually clear out the testing folder. So once v120 is released, i'll move those images to http://dietpi.com/downloads/images section.

or should I add a piece of code that pulls the version number from github?

We dont always create a updated image for each DietPi version due to the time involved to complete them. Sometimes we update 1 image (eg: due to OrangePi PC root exploit) if needed.

So in other words, to get the latest image, your best bet would be to scrape the contents of this folder (once the new images with version codes are there): http://dietpi.com/downloads/images/ . Then either remove vXXX from the scrape, or, wildcard DietPi_v*_Device-Arch-(distro).7z

rhkean commented 8 years ago

ok, I disagree with putting the version number in the 7z filename, then. The reason for suggesting the naming convention was to facilitate automation as noted above: DietPi_${Board}-${Arch}-(Jessie).7z

adding the version number into the .7z filename prevents automation, since wget doesn't support wildcards in the URL.

Addionally, since the download will only provide the latest image, and the .img filename has the version number in it, there is no reason to include it in the .7z filename.

Fourdee commented 8 years ago

@rhkean Seems Curl doesn't support wildcards either, at least not natively http://apple.stackexchange.com/questions/60360/use-curl-to-download-images-from-website-using-wildcard.

I think @k-plan wanted to know the image version, before downloading the file and having to extract it. But as DietPi updates automatically at 1st run, the version number of the image has less value.

I'am going to have to agree with @rhkean on this one. Adding the version codes into .7z means manually updating the dietpi.com page download links, each time a new image is released. I'd rather not have to do this each time, adds a risk of broken links.

So, .7z will not contain the version number.

Done, testing folder updated: http://dietpi.com/downloads/testing/

Fourdee commented 8 years ago

Ok, i'll get virtualbox image updated.

@xenfomation Any chance you would be up for updating the Xenserver image?

Fourdee commented 8 years ago

Done: http://dietpi.com/downloads/testing/