LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   Slackware ARM local mirror repository - EXIT status 1 (https://www.linuxquestions.org/questions/slackware-arm-108/slackware-arm-local-mirror-repository-exit-status-1-a-4175692036/)

Exaga 03-14-2021 09:42 PM

Slackware ARM local mirror repository - EXIT status 1
 
So, mralk... I spent the past few days working on some little project called "Slackware ARM local mirror repository " and then today a found a website and received a coded-error message...

Code:

trap "{ echo '$? $1' 1>&2; }" EXIT
...which turned out to be "EXIT status 1 - dot.com" :D :cool:

I read your page and am seriously interested in what you're doing, and how, and why, and when (etc.). I have questions... loads of them. But it's 02:30 here and I need sleep, after spending half the evening on SlackDocs and loving every minute of it.

Hopefully tomorrow my mind will be more active and I can quiz you about a great deal of things concerning the "EXIT status 1" thing. :thumbsup: :)

mralk3 03-14-2021 10:33 PM

What do you need to know? The mirror is a stock, full installation of Slackware ARM. It has a 500GB hard disk. x86 && x86_64 Slackware repositories mirrored. It will eventually mirror aarch64. It also mirrors Slackware arm and Slarm64. I tinker a lot and try out different ideas I find on the web.

The Pi 1 has been replaced with my RockPro64, which I am also using to write to you in a KDE Plasma environment. Same httpd configuration to share the mirrors. The x86 mirroring is for when I need to provision a machine to set up a build virtual machine (slackrepo) on my laptop to work on the SlackBuilds I maintain for SlackBuilds.org. Lately I haven't really been updating those mirrors.

Right now I have all my arm devices set up to do different things. I can easily turn off those things and then launch distcc to have a mini build farm. I don't have a lot of money, so I make do with what I have and can afford.

I had an idea to use tftp to boot a network installation using u-boot for my ARM devices. Then just pull down the packages from within installer from the same host, running httpd. It sounds like a waste of time, but allows for FAST, repetative testing of Slackware ARM if you have a wired Gigabit LAN. It is inspired by Stuart. That idea depends on what Slackware aarch64 15.0 features once it is released.

Exaga 03-15-2021 04:22 AM

Quote:

Originally Posted by mralk3 (Post 6230442)
What do you need to know?

Great thanks for all your info. You've preempted me asking many questions about what you're doing with your setup, how you're doing it, and what it's made up of.

My backstory: A friend of mine recently suggested for me to setup a local mirror repo because I was (re-)installing Slackware ARM on a very frequent basis for SARPi testing and I've pretty much used the mirror(s) as source media most of the time (mainly for ease and/or out of laziness, and almost always slackware.uk/slackwarearm/*). In fact, I'm surprised Tadgy over at Slackware.uk hasn't sent to boys round to sort me out for the amounts of his bandwidth I must be chewing up over the years. I'm ever more surprised with myself for not thinking about creating a local mirror repo. It's so much easier and sensible and <insert another +100 reasons here>. My setup is not too different from yours. I've got the Apache web server running, httpd daemon, (etc.) on a Raspberry Pi 2 - which I am also using as a NTP server on my local network - but I haven't bothered to setup virtual hosts, nor have I configured/considered a lot of other things that could or should be done. Anyway...

I think your webpage is great and that's why I wanted to discuss a few things about your setup with you. Mainly the finer details of what you've done with httpd configurations, how you've done it, and why. I'm trying to learn and understand for myself the inner-workings of httpd.conf, automod.conf, etc., and after reading your blog, I said to myself, "Who better to ask than the guy who's now running exactly what I'm trying to achieve?" :D

The hardware is of little importance. I'm damned sure your RockPro64 outshines my Raspberry Pi 2 in all areas. It's currently running off a 64GB SD card because I did it quickly and don't have a SSD spare for the job - but that's going to change as soon as I can manage it. I usually access this Raspberry Pi 2 system from an Ubuntu laptop using the terminal, or Windows 10 desktop using putty, using the FireFox browser on both to access the repository URL.

So, I want to learn how to configure httpd so viewing through a browser can appear as clean and high quality as (for example) this layout: ftp://ftp.arm.slackware.com/slackwarearm [that's just plain and simple, stunningly neat and tidy, and drool-worthy!] - because at the moment mine's a default font without any css injection, and looks very ugly-default like it's a throwback retro-attempt from the 1970s. The only obstical right now is the httpd config and any other related topics. I can create/manage any website-specific html/php/css code once the web server is configured and working OK, that's no problem at all - been doing that for years. Incidentally, I got some quality help and advice from Tadgy which enabled me to get the IndexOptions to display, pretty much the same, as slackware.uk so that the directory and file order is similar. I've been toying with the httpd configuration on and off but what's missing is a really good, in-depth guide/tutorial, or set of instructions to teach me everything I need to know about how to be successful. If you're aware of anything like that it would be a great help. I find a lot of the time I need to google for several pieces of information, all adding up to the same result, in a dozen different places all over the Internet, piece by piece. It's often frustrating and confusing for me. I find the apache.org docs are sometimes informative but can be overcomplicated (due to terminology I'm not entirely au fait with) like it's intended for NASA scientists or those who already know what most of it means. lol

mralk3 03-15-2021 06:38 AM

To start, here are the configuration changes I make to httpd.conf. Keep in mind that this mirror is running on my LAN behind two hardware firewalls. The settings for a public mirror on the web are much different. This also assumes you are hosting just one site. Virtual hosts are not really necessary for this. They are mostly used to simplify hosting multiple directories for apache.

Set the name to the hostname. If you are paranoid you can also enable SSL; I would use lets encrypt here but beyond the scope of this.
Code:

# Use port 443 for SSL
# ServerName rockpro.local.lan:443

# clear text
ServerName rockpro.local.lan:80

Point apache at the files you want to host. Make pretty index listings. Remove all security restrictions on the directory; makes it easier to set up .htaccess if you are into that sort of thing.
Code:

DocumentRoot "/mirror"
<Directory "/mirror">
  Options Indexes FollowSymLinks
  IndexOptions FancyIndexing VersionSort NameWidth=* # Widen the page to fit longer names
  AllowOverride All
  Order allow,deny
  Allow from all
  Require all granted
</Directory>

Uncomment the following; edit them to your liking:
Code:

# Fancy directory listings
Include /etc/httpd/extra/httpd-autoindex.conf
..snip..
# Various default settings
Include /etc/httpd/extra/httpd-default.conf

I read some of your slack doc on the subject. You may also be interested in:
Code:

# User home directories
#Include /etc/httpd/extra/httpd-userdir.conf

I use /etc/hosts to point stuff at http://rockpro.local.lan/, but I will eventually use dnsmasq to host DNS on the LAN. I am currently restructuring the network and deciding what services will run where. The RockPro is a lot more powerful and can do more. I may end up trashing everthing except for the Raspberry Pi 4 and repurpose the "lesser" Pis for new project prototyping.

My router has DHCP reservations for each host on the Wired LAN.

I use /etc/hosts like so until I add DNSmasq:
Code:

127.0.0.1      rockpro.local.lan rockpro
::1            rockpro.local.lan rockpro
192.168.40.200 mothership.local.lan mothership  # laptop
192.168.40.201 fourb.local.lan fourb            # rpi 4
192.168.40.202 threeb.local.lan threeb
192.168.40.203 threeplus.local.lan threeplus
192.168.40.204 rockpro.local.lan rockpro


Exaga 03-15-2021 08:42 AM

Quote:

Originally Posted by mralk3 (Post 6230492)
I read some of your slack doc on the subject.
[code]

Thanks very much for this info mralk :thumbsup:

The nginx stuff? That's not too difficult. But Apache is like:

[71.b2az Indicator] This is an indicator which is for indicating that an indicator is an indicator and used to indicate that an indicator is either an indicator, or an indicator indicating it is an indicator. Indicators can only be used as indicators unless they are being used with other indicators, in which case they are indicators for indicating that an indicator is being used in place of another indicator. Indicators are indicators until they're not and then they are indicators. Only use indicators as indicators or in place of indicators. See reference 159.3y42f about extra uses for indicators(1c) indicators(2t) indicators(3g) indicators(4d) and indicators(5f).

I mean, who writes this kinda stuff? It just needs keeping simple, like Slackware philosophy...

Here it is <name>. This is what it does <non-overlycomplicated explanation>. Here's how to use it <basic/advanced examples>.

:D

mralk3 03-15-2021 08:52 AM

I guess I am used to reading docs like that. Sometimes I set up a container with lxc and try different settings before changing something that is production.

Exaga 03-15-2021 09:02 AM

Quote:

Originally Posted by mralk3 (Post 6230529)
I guess I am used to reading docs like that. Sometimes I set up a container with lxc and try different settings before changing something that is production.

Yeah this is just for me on my local network. I have managed so far to config httpd to do what I need, and it's working great, but it's the stuff behind and after "It Works" that's confuzzling me. Now I'm onto things like making the '/var/www/icons' look in another folder for images, creating a default css and loading it, etc. Building an ARM kernel for a brand new architecture without any _defconfig is much easier... and much more fun right now. HAHAHA :D

Of course, tailing the httpd error logs helps to sort out any problems but with nginx it's so straight forward. Unfortunately I want to use .htaccess shizzle and nginx isn't as facilitating as Apache in that area.

[Sat Mar 07 13:39:05.215949 2021] [core:alert] [pid 838:tid 1697641328] [client 192.168.1.41:56470] /srv/httpd/htdocs/slackwarearm/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://192.168.1.17/slackwarearm/ - [read www.apache.org to fix this problem and prepare to have your synapses fried into carbon dust particles which NASA might be interested in scanning for signs of life in the deep, darker, outer-regions of the known cosmos]

I once read something by alienbob that went something like: "hint: the answer to the problem lies within the error message..." so I guess taking that advice might be productive but when it comes to the Apache documentation I get very lost very quickly. lol

Thanks again! :thumbsup: :D

mralk3 03-15-2021 09:09 AM

It looks like the armv8 generic kernel config was removed from the public mirrors. I haven't tried building a kernel just yet. I am still working out some other things. I think a new kernel, modules, and firmware might fix up some errors I see in dmesg on this rock pro.

Have you rebuilt anything yet to have an armv8 system on the raspberry pi?

Exaga 03-15-2021 09:35 AM

Quote:

Originally Posted by mralk3 (Post 6230540)
It looks like the armv8 generic kernel config was removed from the public mirrors. I haven't tried building a kernel just yet. I am still working out some other things. I think a new kernel, modules, and firmware might fix up some errors I see in dmesg on this rock pro.

Have you rebuilt anything yet to have an armv8 system on the raspberry pi?

Sure thing. I've been (re)building ARMv8 kernel/modules and making pkgs very frequently, updating the SARPi64 build scripts to include new device firmwares, etc. Alas, we don't have Slackware Aarch64 yet so I can only test building it, not installing it. As far as I can tell everything is in place for when Aarch64 is released.

I'm using the Raspberry Pi 2 running Apache web server to create the new SARPi website content. But I need to speak with MoZes before I go much further with that and inquire about his vision for the future, so I know which elements to include and which direction it sould take. No spoilers available at this time. :p

mralk3 03-15-2021 05:25 PM

I see some edits I missed earlier. I don't do much with the header of my mirror or the icons. If it looks good in links or lynx, I am happy. Not worried about how the GUI looks with firefox.

Typically the only time I view the actual index page is when I am forgeting the directory structure of the mirror while doing an http installation of Slackware. Even then, I just use curl and grep, haha. The rest of the time I use SSH or NFS to transfer or view files between systems on my network.

The rewrite engine isn't necessary for a mirror, IMHO. BUT, it does do some fancy stuff with .htaccess to make pretty :rolleyes: URLs...

mralk3 03-15-2021 05:48 PM

I was curious and googled. Cloned https://github.com/Vestride/fancy-index into my apache root. I copied the .htaccess into the apache root. Now my listings have a search box.

Exaga 03-15-2021 06:46 PM

Quote:

Originally Posted by mralk3 (Post 6230678)
I was curious and googled. Cloned https://github.com/Vestride/fancy-index into my apache root. I copied the .htaccess into the apache root. Now my listings have a search box.

VERY cool! :cool:

Thanks for this info. It's really good. :thumbsup:

mralk3 03-15-2021 07:04 PM

Quote:

Originally Posted by Exaga (Post 6230688)
VERY cool! :cool:

Thanks for this info. It's really good. :thumbsup:

I'm just happy it wasn't super complicated.


All times are GMT -5. The time now is 07:28 PM.