1 |
On 08/14/2015 04:21 AM, Daniel Campbell (zlg) wrote: |
2 |
> -----BEGIN PGP SIGNED MESSAGE----- |
3 |
> Hash: SHA256 |
4 |
> |
5 |
> On 08/13/2015 06:29 PM, wireless wrote: |
6 |
>> On 08/13/2015 05:28 PM, Duncan wrote: |
7 |
>>> wireless posted on Thu, 13 Aug 2015 08:33:13 -0500 as excerpted: |
8 |
>>> |
9 |
>>>> On 08/12/2015 09:52 PM, Mike Frysinger wrote: |
10 |
>>>>> On 12 Aug 2015 18:27, Brian Dolbec wrote: |
11 |
>>>>>> 2) There is another alternate location that you can define |
12 |
>>>>>> files to ignore locally without having to commit them to |
13 |
>>>>>> .gitignore. Consider .gitignore a global setting. There is |
14 |
>>>>>> another setting inside .git/info/exclude which is a local |
15 |
>>>>>> config file that will persist and not be affected by |
16 |
>>>>>> pulls. |
17 |
>>>>> |
18 |
>>>>> as i stated, there's no reason for these paths to ever be |
19 |
>>>>> committed. conversely, some people (not unreasonably so) will |
20 |
>>>>> place files in there that have historically had known |
21 |
>>>>> meanings. adding these to the global gitignore is simply the |
22 |
>>>>> right thing to do and negatively impacts no one. |
23 |
>>>> |
24 |
>>>> As a gentoo user now coding again, I find the need to have |
25 |
>>>> things "logically organized" really helps in my efforts. Like |
26 |
>>>> most others, I get codes from a variety of places and try to |
27 |
>>>> follow the 'logical gentoo organization'. I use |
28 |
>>>> /usr/local/portage extensively for ebuilds that I develop. |
29 |
>>>> There is also /opt/ which seems to collect up a variety of |
30 |
>>>> ebuilds |
31 |
>> |
32 |
>>> Confused... |
33 |
>>> |
34 |
>>> What do /opt and /usr/local/portage have to do with the gentoo |
35 |
>>> repo's .gitignore, which should only need ignore settings for |
36 |
>>> locations inside the main tree, /usr/portage by default? A |
37 |
>>> .gitignore listing for /usr/portage/local and |
38 |
>>> /usr/portage/distfiles, etc, makes sense, since that's inside the |
39 |
>>> default tree location. But /opt and /usr/local/portage aren't |
40 |
>>> inside that default location and are thus about as apropos to |
41 |
>>> that as the price of tea on Mars, aren't they? |
42 |
>> |
43 |
>> <snip> /distfiles/ /local/ /packages/ <end/snip> |
44 |
>> |
45 |
>> Other postings in this thread mention /var/ and /usr/.... My bad, I |
46 |
>> thought those official directories that were up for discussion on |
47 |
>> gitignore relevancy? |
48 |
>> |
49 |
>>> /usr/portage/local was the original location for the user's own |
50 |
>>> personal ebuild space - an "overlay" if you will. |
51 |
>>> /usr/portage/distfiles and /usr/portage/packages are there |
52 |
>>> because that's where ports has put them for decades, and no-one |
53 |
>>> has gotten around to changing it in portage yet. FreeBSD defines |
54 |
>>> the use of /usr very differently to what Linux users are used |
55 |
>>> to. |
56 |
>>> |
57 |
>>> Those dirs really should be in /var/portage, and the user's |
58 |
>>> overlay has no business being under main tree itself |
59 |
>> |
60 |
>> |
61 |
>> Ok, so why is net-analyzer/jffnms found in /usr/portage/distfiles |
62 |
>> yet it is installed in /opt/ ? If jffnms was (properly) installed |
63 |
>> like other net-analyzer packages, would it not be in the portage |
64 |
>> tree? There is no reason for it to remain in /opt/, that I'm aware |
65 |
>> of. But jffnms could benefit form gitignore as other packages do, |
66 |
>> regardless of where it is installed. |
67 |
> |
68 |
> If I may take a stab at this: /usr/portage/distfiles is simply the |
69 |
> files Portage needs to fetch in order to extract them, build, and |
70 |
> install the package. If ./distfiles/ is in .gitignore, then nobody can |
71 |
> accidentally commit a package's source tarball or other related file. |
72 |
|
73 |
Agreed. |
74 |
|
75 |
> /opt/ is just the installation location for the live system that it's |
76 |
> being installed on. The Portage tree (known forward as the Gentoo |
77 |
> repository) is the collection of ebuilds that allow a Gentoo system to |
78 |
> build the software. It's historically been in /usr/portage/, and |
79 |
> installs to a variety of locations, be it /bin, /sbin, /usr/bin, |
80 |
> /usr/sbin, /lib, and so on. |
81 |
|
82 |
As documented here ?: |
83 |
https://devmanual.gentoo.org/general-concepts/filesystem/ |
84 |
|
85 |
> Without reading the ebuild, jffnms likely has special properties or is |
86 |
> built with specific technologies that indicate its files belong in |
87 |
> /opt. Given that the Gentoo repository by default resides in |
88 |
> /usr/portage, a .gitignore file can only apply to paths *under* that |
89 |
> particular path. So it would cover ./local and ./distfiles, but not |
90 |
> /opt, as /opt is outside the /usr/portage location and not under Git |
91 |
> control. |
92 |
|
93 |
Looking at jffnms would have shed some light on the arbitrariness of |
94 |
/opt/ policies. Perhaps looking more closely at /opt/ and the various |
95 |
packages, you will find deviation from this aforementioned explanation. |
96 |
Look, I know this whole "git" migration is a work in progress. And |
97 |
everybody knows there is quite a bit of work to do on the docs and that |
98 |
will take some time after the discussions have settled. What I am |
99 |
suggesting is that /opt/ is a mess with sources, binaries, code-license |
100 |
restriction murkyness and codes just placed there without valid |
101 |
(currently) reasons. Some attention would seem integral to the |
102 |
'gitignore' policies of both the gentoo-repo (tree) and the way ebuild |
103 |
construction documents suggest folks use gitignore on other git repos. |
104 |
That's it. No confusion at all, just a coder wanting some sanity and |
105 |
robustness injected into the processes (outside of official gentoo repo) |
106 |
that result in ebuilds (of sufficient quality and merit) ending up in |
107 |
the gentoo-repo (portage tree). A well defined pathway, if you like. |
108 |
|
109 |
|
110 |
> Was I able to explain that sufficiently? |
111 |
|
112 |
gitignore as implemented into the "gentoo repo' will have unique |
113 |
policies and attribute as the devs must coalesce into a consensus. I get |
114 |
that. But gitignore can also be used (and should be used) by the other |
115 |
repos where code development, porting and community tweaks occur. |
116 |
It would be a great idea to have some guidance (documented suggestions) |
117 |
on gitignore for those efforts, particularly where codes (which will |
118 |
become ebuilds) that is end up in the gentoo-repo (portage tree). |
119 |
Perhaps some planning to smooth over the usage of gitignore as an |
120 |
individual's suggested git-repo semantics, thus creating a clear |
121 |
migration pathway for ebuilds to the gentoo repo as smooth of a |
122 |
transition as possilbe. This will also clean things up a bit as GLEP 64 |
123 |
comes closer to being a (wonderful) reality. I really get cleaning out |
124 |
the cruft (non essential or transient) files and such. Most folks do not |
125 |
understand that a robust implementation of GLEP-64 complete with |
126 |
auditing tools, DAGs and such, can lead to a fully audited linux system. |
127 |
That is *HUGE* in the computational, controls and other forms |
128 |
of fully characterized system worlds. That may not be the immediate goal |
129 |
of the general gentoo dev community. But as one with several diverse |
130 |
areas of engineering expertise, it is the most exciting aspect of gentoo |
131 |
to date. ymmv. gitignore is a very, very important tool along that |
132 |
pathway, imho. |
133 |
|
134 |
|
135 |
Hopefully, I articulated this clearly and it will lead to more folks |
136 |
wanting to develop ebuilds, regardless of their formal affiliations with |
137 |
gentoo. I hope that more ebuild into the gentoo-repo is seen as a |
138 |
positive thing. |
139 |
|
140 |
>> Looking at the documentation for gitignore it would seem that the |
141 |
>> benefits of using gitignore on those /opt/ packages could be |
142 |
>> useful; so would it not be up to the particular package maintainer |
143 |
>> to make that decision? Regardless of where non-devs develop |
144 |
>> packages for gentoo, using gitignore might be useful during the |
145 |
>> development of the packages, particularly if it is destine for the |
146 |
>> portage tree (eventually). |
147 |
>> |
148 |
>> Apologies in advance if I have missed some key points already |
149 |
>> established by the gentoo dev community.... I'm certainly no whiz |
150 |
>> with git*. |
151 |
> |
152 |
> /opt is simply the chosen place for certain programs to be installed |
153 |
> based on how they are structured, their licensing, or the way similar |
154 |
> packages get handled. |
155 |
|
156 |
Let me know when there is an updated (as I look at these discussions as |
157 |
leading to 'drafts') version of this '/opt/' information in devmanual or |
158 |
elsewhere, as this is currently "clear as mud" as an official policy:: |
159 |
|
160 |
"/opt: Binary-only applications." |
161 |
|
162 |
|
163 |
> Users can use the INSTALL_MASK variable in /etc/make.conf to exclude |
164 |
> any paths from having files installed, but if things break they get to |
165 |
> keep the pieces. |
166 |
|
167 |
> |
168 |
> tldr .gitignore just applies to the Gentoo repository, not an entire |
169 |
> Gentoo system. |
170 |
|
171 |
gitignore, should be discussed, not only as a gentoo-repo need but for |
172 |
consistency on how ebuilds from overlays, and other development sites |
173 |
(can) use it to make ebuild migration to the gentoo-repo relatively |
174 |
straight-forward; all other factors being equal; imho. |
175 |
|
176 |
I personally think some of this sort of coherent organization presents |
177 |
gentoo in a more favorable light as a platform for all sorts of code |
178 |
development. |
179 |
|
180 |
|
181 |
> Daniel Campbell - Gentoo Developer |
182 |
|
183 |
James |