-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add uninstall target to Makefile #849
Comments
Regarding grim being able to manage GHDL, bear in mind that GHDL can have a rather complex build procedure. Although, I think that grim might already do what you want with existing resources: # Get a specific version
git clone https://github.com/ghdl/ghdl && cd ghdl && git reset --hard <version_tag_or_sha>
# or
git clone -b <version_tag> https://github.com/ghdl/ghdl
# Build
# E.g. mcode
./dist/travis/build.sh -b mcode -p ghdl-mcode.tgz
# E.g. LLVM with default-pic
CONFIG_OPTS="--default-pic" ./dist/travis/build.sh -b llvm-6.0 -p ghdl-llvm-fPIC
# Install
tar -xzf ghdl*.tgz -C /opt/grim/ghdl
# Uninstall
rm -rf /opt/grim/ghdl Provided that you also Using Overall, I feel that, in the context of GHDL, If you use A package manager is expected to either analyze or have a predefined list of the contents of the tarball. It can also have a list of locations where the program might generate data in the future. So, when you request to uninstall the program, the manager has a list of paths to remove. In this comment you will find references to various threads where we gather information about how is GHDL being packaged for various distributions. The Arch Linux case is very didactic. There are four variants, three of which use the 'latest' from Summarizing, I think that the request to have a list of paths where GHDL or the companion scripts are expected to generate content is interesting. This can be useful as a makefile target, but also to improve the packaging of GHDL for different distributions (some files might actually be being left behind). However, I would strongly discourage using |
You probably meant gim, didn't you? 😃
I know. Gim is simple and gim ready projects should "just work". Therefore, gim relies on default project configuration no matter how many possible options it has. Gim itself can be installed with some additional options as well. Take a look at its Regarding what gim does when installing a project, I can simplify it to the following:
That's exactly what I want. Note that gim, in its current state, is mostly focused on installations from source code. Later, having more installers, its functionality can be significantly extended, e.g., to installations from precompiled tarballs. The same statement is valid for project-defined installers, which is a planned gim feature (if you really want gim to install GHDL using
As long as I know,
Installation is demonstrated in GDHL README.md file this way. Furthermore, I still don't see anything wrong with this installation from source code. |
@1138-4eb I don't understand your point of view. What is wrong with I think we should follow the GNU conventions: |
Yes, sorry, I got mixed with Brothers Grimm.
If you are going to support GitHub only, you might want to consider using https://codeload.github.com/ghdl/ghdl/tar.gz/master and the GitHub API instead.
This is where you can save a list of the files that were installed. Instead of making
I don't want gim to use
The point is not who manages For example, GHDL provides some helper scripts to compile and install vendor libraries: https://github.com/ghdl/ghdl/tree/master/libraries/vendors. This is quite usual, and they can be located anywhere (the location of GHDL, HOME, /opt). The main Makefile in GHDL is not aware of these. So a Sincerely, at this point, I'd rather make nightly
There are two reasons for it (@tgingold, correct me if I'm wrong): On the one hand, the note below is specific about Windows, where there is no conflict. One reason to show On the other hand, it is an old convention. The target audience when it was written was users that were used to compiling C programs from sources. In this context, it is well known that There has been some effort to improve the docs to make it easier for new users, but there are still some inconsistencies in this sense: some very easy to follow parts and other very specific details. Overall, GHDL has always been and still is, a tool for developers. This means that knowledge and certain proficiency about GNU/Linux, VHDL, C, Ada, etc. are expected/assumed. E.g.:
From this point of view, I feel that GHDL might not be the best project to be 'gim compatible'. If a user wants the latest version by executing a single command, I believe she/he expects to get a binary/tarball and install it. So, we'd better go for nightly Nonetheless, if you constrain it to
This is a different issue. I had not considered this context. I meant that the user might want to install some backend different from mcode, which requires additional arguments to |
Nope, I am trying to develop gim so that it depends only on Git from the server's side. I was on GitLab and it worked. Now on GitHub it works as well.
Well, you probably don't know what's the content of status file. One line per installed project containing canonical form of URL, installed commit hash and installed prefix. Example on my system from /var/lib/gim/status:
However, the idea of temporary directory is great. That would lead to create a map which files to delete during uninstallation even without uninstallation recipe (not mentioning security issues). Nevertheless, some projects don't respect prefix at all (or partially - e.g., bash completion implementation) and I also don't want to maintain rather big database. I stick with relying on projects' uninstallation recipe.
Right now, gim is just an installation manager, not a package manager. And even after becoming a SIMPLE package manager (it will only install dependencies first if any), it is not going to be the only app managing the path.
I hope, gim will never do that. It manages its own database and a package manager manages its own as well. @1138-4eb I am sorry, but I still don't know why installation from source code is a bad thing.
Maybe my message was not clear. Gim is simple. It is simple by design and, frankly, simplicity is the most important characteristics of gim for me. It is also the answer to a lot of your questions (past ones and probably future ones as well). However, still I don't know why it should be limited to Debian-based distributions only. |
Note the bandwidth, tho.
I should have said 'when' instead of 'where. I don't mean to discuss implementation details, but the steps in the process when you can introduce additional features to solve the issue.
The size of such a database should be negligible compared to downloading and keeping a cache with the full repo. Anyway, I understand that you don't want to increase the complexity.
An installation manager is a package manager with reduced features; it handles a single package instead of managing dependencies too. Moreover, the functionality of gim (installing a tool from git by providing a configuration file) is already supported by some package managers, such as pacman and a PKGBUILD (ref above), or dpkg-buildpackage and Name it however you want, my suggestion is to look and learn how others have solved the problems you are finding and that you will probably find in the future. Both Arch Linux's and Debian's packaging systems are solid references.
Because you want it to be simple by design. Supporting Debian-based distributions only and mcode only lets you be sure that the dependencies you need are Hence, to support something different from mcode on Debian, you would need the user to tell which distribution is using or gim should handle it. Both options increase the complexity. |
@1138-4eb You know what? Thanks to your constructive comments, I've been thinking a lot. Gim is not and probably won't be as flexible as I initially intended. I am thinking about a complete redesign (read: create a new repo) with support for interpreted languages-only, which will be essentially different and more simple. Lately, it seems for me that gim is over my head. Anyway, I would still be at least for some basic and straightforward |
Well, almost 20 years ago, and more than 20 after writing TeX, Donal Knuth said: "In fact, my main conclusion after spending ten years of my life working on the TEX project is that software is hard. It’s harder than anything else I’ve ever had to do" (ref). Yes, software is hard. But you can turn the computer off and relax whenever you want ;)
It is quite common, indeed. When you imagine a project, everything seems simpler. As you start implementing it, complexities arise, and almost always you reach a point when you need to cut features, or just stop. Nonetheless, if you really like the topic, do not discard it so fast. Think about what you have learned while doing it, and what can you still learn from it. It's always more exciting to apply new concepts/tools to your own project, rather than repeating all the 'Hello World' examples.
I don't know exactly what you are thinking when you say 'interpreted languages', but I think that this might not be a relevant enough criteria. Let me explain: Almost all the 'new' languages do already have one or multiple package managers that allow to interact with GitHub repositories easily. Golang has My humble suggestion is to focus on an area of knowledge, a niche, instead of trying to draw a line that depends on technical details (the tool to communicate with the server, or the language). For example, focusing back on hardware design and on VHDL (since this is GHDL's repo), and related to package managers/installers, I am not aware of any standardised open source tool to share, test and use free IP cores. These are some of the tools/libraries I know:
NOTE: almost all of these are related directly (because they explicitly support it) or indirectly (because any VHDL project can be simulated) with GHDL.
So many resources, and still each of those repos is a kind of isolated island. Some of the tools can coexist, but the integration of most of them depends on the user. As a result, each of the libraries/projects follows a different structure, and it is difficult to just open a new project and try to not drown yourself while diving into the sources. LibreCores and OpenCores are the only ones with a search tool, and still it is hard or impossible to properly filter the results. What's the solution? Maybe a user-friendly tool to interact with IPXACT, as fusesoc does. Maybe some reduced version, that can be later extended. Maybe some custom checklist, similar to what REUSE does. Or maybe none of them. I don't know, I'm just thinking out loud. It's just an excuse as any other for you to know some other neighbours in the town (in case you didn't knwo them already). The summary is that you can learn a lot by finding and actively doing small contributions to fix/enhance existing long-running open source projects, instead of doing a titanic effort alone. For example, in this specific issue, should you have tried to implement the I'm just telling this to you because I also started some apparently simple but no-so-simple software projects in the past which seemed important to me. After learning the basics, and hitting the wall a few times, I discovered how helpful it is to have more experienced users around that tell me when I'm trying something stupid. Tristan's patience and persistence are to be really thankful.
Yes, I'm ok with it. As @tgingold commented, GHDL (he) tries to follow GNU conventions, so it should be added. Nevertheless, it is still not suggested to use |
@1138-4eb Hi! 👋 More than 2 months of a lot of work even during having a full-time summer job and here we are again. I am proud to tell you that GitPack, successor to gim, does very well. As I have indicated, I have completely redesigned gim into GitPack, which is now a really simple package manager. 📦 Simplicity is the key and so far I have spent time equally on thinking about features and actually developing them. And so I got rid of unnecessary features and make GitPack much more simpler compared to gim. It does not support installation and uninstallation multiple ways like gim did, rather it supports its native and simple GitPack installation and uninstallation format inspired by the structure of Debian packages. GitPack is simpler than ever and I am excited about GitPack more than ever. 😃 I know that there might be many already existing solutions like GitPack. But when I needed something really simple just like today's GitPack, i.e., Git-based, language-independent, host-independent, POSIX-friendly, Shell-based and with local and global installation support, I couldn't find anything. So I created my own solution. Gim was the first try. GitPack is the second and I hope it is the last as well. Recently I have released GitPack 0.3.0 and the roadmap for the first stable release looks promising. I have also transformed former gim projects into GitPack projects. I am really excited about the whole project. 🚀 Once again, a big thank you! ❤️ GitPack as per its current state exists thanks to you. If you have any projects in an interpreted language and you want to provide a way to install, update or uninstall them to end users, give GitPack a shot. Everything you need to know is stated in the GUIDE.md file. If you have any comments or questions, feel free to ask me here, on my email or create an issue at GitHub. 👍 |
Is your feature request related to a problem? Please describe.
I am a developer of gim project. It is a simple Git-based installation manager and it can install GHDL using
gim install github.com/ghdl/ghdl
. Right now it supports only basic./configure && make && make install/uninstall
andmake && make install/uninstall
approaches.Gim also can update software. Right now update works as long as gim can install and uninstall a project, which leads me to the problem. I can't uninstall/update GHDL until
uninstall
target will be introduced. It would be great to haveuninstall
target in the Makefile if it is not really hard to implement.Describe the solution you'd like
Make
make uninstall
command run in the root of the GHDL repository uninstall GDHL from the system.Additional context
Gim supports installers (dynamically loaded modules used for installation or uninstallation) and approches described above are actually implemented by two installers. Gim doesn't stop here however. I am going to add more installers (such as setup.py, install.sh, cmake, user-delivered installer) and also I am going to transform gim into a simple Git-based package manager.
Right now gim provides (as per its README.md):
If you implement the
uninstall
target, GDHL will become gim ready project and users can use gim to install it, update it and even uninstall it. Gim updating is based on Git tags, so you don't have to maintain nothing more than now. Also note that gim supports Linux, macOS and Windows (through WSL).All information (and a little bit more) can be found in the Developer section of gim project.
If I can be of any help with gim integration (except for
uninstall
implementation for GHDL), do not hesitate to ask me. I have been developing gim for almost one year and I am even prolonging my studies due to it yet it is not perfect. GHDL would be the first official gim ready project not being developed by me (1acheng/INX_Editor has no relation with gim). I would be more than honoured.The text was updated successfully, but these errors were encountered: