Comments (25)
Argh, again, I totally never thought of the icons when I moved the files. Was acting on a "simple" request from Rob and never thought about the icons. I will try to get this sorted out at the weekend. Thanks for letting me know!
By the way, this edition of Calibre was the first to successfully publish from the new server that I have created in Azure dedicated to chocolatey automatic packages. It is running all the time, every hour, so the auto packages running in the coreteampackages repo should almost instantly be up to date :-)
from chocolatey-packages.
Argh, again, I totally never thought of the icons when I moved the files.
Not a big issue. This happened also to other package maintainers.
But of course it’s better to avoid it. Using an orphan gh-pages branch would solve this problem (unless the repository changes).
Look how I use it:
- https://github.com/tomone/chocolateyautomaticpackages/tree/gh-pages
- The iconUrls in the packages are then in this format: http://tomone.github.io/chocolateyautomaticpackages/freeciv.png
I know, it requires a few minutes to set them up, but in my opinion it’s worth the effort. The iconUrls are then shorter and easier. In addition I read on multiple resources that do not recommend to use the raw url to a file hosted on GitHub.
By the way, this edition of Calibre was the first to successfully publish from the new server that I have created in Azure dedicated to chocolatey automatic packages.
Very nice. But even cooler would be if it would be possible to handle automatic packages with a (headless) Linux server. Then I could set them up on my Raspberry Pi at home. In addition, Linux hostings are usually cheaper. Only because we make Windows packages, it doesn’t exclude the use of Linux. 😃
from chocolatey-packages.
Ah @TomOne, we think alike there. There are some things happening this year that should make *nix more friendly. :)
from chocolatey-packages.
@TomOne I like it! I will look into getting that setup as well. It currently isn't costing me anything to run this server in the cloud, so there is no great loss there, but there is no doubt that linux hosting would be the preferred option in terms of cost.
from chocolatey-packages.
I have implemented the required changes in this pull request:
Gary
from chocolatey-packages.
Obviously the changes won't take affect until new packages are pushed to chocolatey.org, but hopefully everything should be lined up ready for when that happens now :-) Baby steps...
from chocolatey-packages.
Awesome. 😃
Using the gh-pages branch has also other benefits:
- Sometimes it happens that raw links to files on GitHub repositories don’t work (maybe because maintenance work on GitHub). And I’ve read that GitHub blocks the access the raw links when there’s too much traffic. But these two issues don’t exist with GitHub pages.
- I’ve read that it’s recommended to use GitHub pages instead of raw links. Raw links are intended only as preview for files in a repository, not as “hosting platform”:
Wouldn’t it be a good idea to add a general recommendation to the Chocolatey wiki to use a gh-pages branch for the package icons? I know, it takes a few more minutes to set it up, but I think it’s worth the effort.
from chocolatey-packages.
As long as there is a step by step with pictures (or a link to something that is), I'm leaning towards it as secondary guidance.
from chocolatey-packages.
When creating the gh-pages branch manually, I referred to a number of different articles to put it all together. I think a step by step for this specific use case would be required.
from chocolatey-packages.
I just followed the instructions at this official guide. The hardest part was saving all the package icons from the cleaning of the repository. I just did something like this
PS> mkdir icons
PS> cp **\*.png, **\*.ico -destination icons
PS> "icons" > .gitignore
PS> git rm -rf .
PS> git add -A
PS> git commit -am "Move package icons to an orphan branch for better hosting"
PS> git push origin gh-pages
from chocolatey-packages.
Good work @AnthonyMastrean. Just one thing: The contents of in the *.nuspec files need to be adapted too, otherwise the gh-pages branch doesn’t make much sense. 😃
Maybe you already know a quick method to accomplish that, but nevertheless I describe how I did it:
I used the “Regex replace in files” functionality of Komodo Edit. It scans a folder recursively and searches and replaces file contents based on the given regex. Notepad++ has a similar functionality and maybe also Sublime Text.
from chocolatey-packages.
@AnthonyMastrean, maybe you read it already, but this can be useful for the work with the gh-pages branch: #9 (comment)
from chocolatey-packages.
@TomOne, of course! A recursive-replace-regex isn't a bad idea for a large repo. I might just do mine by hand. Thought I'd wrap my head around the gh-pages part first. As for #9, I'm going to play with an "icons" directory + Jekyll from my master
branch and a little Travis-CI to publish to gh-pages
. It's probably overkill, but I want to play :D
from chocolatey-packages.
@TomOne, of course! A recursive-replace-regex isn't a bad idea for a large repo. I might just do mine by hand.
Be careful if you plan to use PowerShell for that. PowerShell supports UTF-8 incorrectly and uses these stupid Windows Codepages (e.g. Windows-1252) by default. Also make sure that it doesn’t write a BOM to the nuspec files.
The Wikipedia article of Windows-1252 states that:
Windows-1252 or CP-1252 is a character encoding of the Latin alphabet, used by default in the legacy components of Microsoft Windows in English and some other Western languages.
Well, that means that PowerShell is a legacy Windows component. Bad Microsoft, bad. 👎
from chocolatey-packages.
@TomOne always getting on MS for their encoding issues... :)
from chocolatey-packages.
Sorry, next time I will restrain myself and try to be a bit more diplomatic ;) I suppose that many users suggested Microsoft to improve this messy situation with character encodings, but without success as we can see.
But now back to the topic: I would be happy to write a tutorial how to set up gh-pages as hosting platform for package icons. I am aware that my English is bad, but there’s always the possibility to correct my mistakes.
Regarding the replacement for Ketarin to handle automatic packages, which also works on headless Linux servers, I would choose Node.js as base platform. Node.js is perfectly cross-platform, lightweight, ultra-fast and asynchronous, which is perfect for interactions with the web.
from chocolatey-packages.
Well, that means that PowerShell is a legacy Windows component. Bad Microsoft, bad. 👎
Is this still the case in the latest version of PowerShell 4?
from chocolatey-packages.
I just followed the instructions at this official guide.
Ok, no idea how I didn't mind that :-) My Google Fu was obviously lacking :-D
from chocolatey-packages.
Well, that means that PowerShell is a legacy Windows component. Bad Microsoft, bad. 👎
Is this still the case in the latest version of PowerShell 4?
Unfortunately yes. I tested it on Windows 8.1 with PowerShell 4.0. You can reproduce it as follows: Create an UTF-8 encoded text file without BOM called test-utf-8.txt
with the following non-ASCII characters as content: © ® δτρν
. Type this in PowerShell:
Get-Content .\test-utf-8.txt
The output will be:
© ® δτ�ν
These are definitely not the same characters. 😄
from chocolatey-packages.
@TomOne :-(
from chocolatey-packages.
Sorry for disturbing you again, but the latest Calibre package (http://chocolatey.org/packages/calibre) still has the old icon location with the raw link to the non existent calibre icon. The source nuspec has the correct iconUrl (https://github.com/chocolatey/chocolatey-coreteampackages/blob/master/automatic/calibre/calibre.nuspec#L16). What happened here?
from chocolatey-packages.
@TomOne I think I know exactly what happened...
I don't think the server that Keratin is running on has the latest version of the source code on it. I think I will need to add another scheduled task to include a git pull on the repo to ensure that the latest code is there.
Gary
from chocolatey-packages.
I have another solution how to create a gh-pages branch for Chocolatey packages. I think it’s is very simple, because it uses only basic Git commands. In addition it incorporates the purpose of my suggestion #9 (comment) right from the beginning. Basically the idea is the following:
- Create a new local repository on the computer called
chocolatey-packages-icons
or something like that. - Do a first commit on master, e.g. a README.md.
- Create a gh-pages branch and switch to it.
- Delete the master branch of the local
chocolatey-packages-icons
repository - Add the chocolatey packages repository as origin.
Then you can:
- Add the package icons and commit.
- Push the gh-pages branch to origin.
- Now you have your package repository e.g.
chocolatey-packages
and a separate folder with only the gh-pages branch in it (chocolatey-packages-icons
).
With git commands, this approach could look like this:
# Make sure that your current working directory is outside of any repository
$ mkdir chocolatey-packages-icons
$ cd chocolatey-packages-icons
$ git init
$ echo "My Chocolatey package icons" > README.md
$ git add .
$ git commit -m "first commit"
$ git checkout -b gh-pages
$ git branch -d master
$ git remote add origin [email protected]:username/repository.git # Replace 'username' with your GitHub username and 'repository' with the name of your existing Chocolatey packages repository.
# Now you can add icons, commit and push with “git push origin gh-pages”
If you like this approach, I would use it for the future guidance how to properly host Chocolatey package icons, which could then be added to the wiki.
from chocolatey-packages.
@TomOne, this seems like a very workable solution to me. If you are happy to write something up, then I am sure we can git it included in the guidance for package maintenance.
from chocolatey-packages.
@TomOne ok, so it was what I thought it was. I have updated the ketarin script that I am using to include a git pull every time that it runs to ensure that it has the latest source of all the packages. Hopefully this will sort it out, and when the next version of Calibre comes out later this week, it will all be sorted. Fingers crossed! :-)
from chocolatey-packages.
Related Issues (20)
- (inkscape) Start menu entry is not visible for all users
- (tor-browser) Package and auto-update broken HOT 1
- (notepadplusplus) Automatic restart of running application during upgrade always launches new Notepad++ process with elevated privileges as user who ran `choco upgrade` regardless of original running user HOT 7
- (nmap) Outdated HOT 2
- (curl) Doesn't install using PowerShell Core as the host HOT 6
- (freecad) is outdated (now 0.21.1) HOT 2
- (nexus-repository) Incorrect docsUrl in nuspec file
- (vlc) is outdated HOT 3
- (vscode.install) outdated - now 1.84.1 HOT 6
- git, git.install - Unhelpful feedback when failing HOT 10
- (libreoffice-still) LibreOffice Still: automatic update broken? update(s) available! HOT 18
- (yumi) YUMI (Your Universal Multiboot Installer): EOL, archived at source site HOT 1
- (yumi-uefi) YUMI UEFI (Your Universal Multiboot Installer): EOL, archived at source site HOT 1
- (putty.install & putty) AU is not updating package scripts in the repository HOT 2
- (spotify) Installation progress hangs / terminates after task creation -> Possible fix HOT 1
- (calibre) Outdated HOT 3
- Package "vivaldi.portable" fails to uninstall HOT 1
- (libreoffice-fresh) Outdated HOT 23
- (tor-browser) Outdated HOT 1
- (lockhunter) Checksum outdated again. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chocolatey-packages.