Skip to content

u/ortango_

In this archive from Nov 2018 to Nov 2022

0
posts
195
comments
0
media
521
score
cat /proc/sys/kernel/randomize_va_space

man 5 proc : /proc/sys/kernel/randomize_va_space

....Make the addresses of mmap(2) allocations, the stack, and the VDSO page randomized. Among other things, this means that shared libraries will be loaded at randomized addresses. The text segment of PIE-linked binaries will also be loaded at a randomized address.....

arch, pie builds by default

$ file /bin/bash
/bin/bash: ELF 64-bit LSB pie executable.....
6 points

setxkbmap -option caps:swapescape

if I wanted to swap capslock with Super_L instead?

you can use caps:super : Make Caps Lock an additional Super

setxkbmap -option caps:super
xcape -e 'Super_L=Escape'
2 points

Why doesn't Powershell output anything when asked "echo $SHELL"?

because that is not how you access env's in powershell... why not read the manual?


wow.... this thread...

top post is "because SHELL is not set". what are the actual chances that login didnt bother to set SHELL?

also, op's solution was to "set it" while referencing the wiki which explains env vars for sh. not particularly helpful... but fortunately pwsh will inherit an environment and can run {/etc/,~/.}profile.

and ps. echo $0 will absolutely not do what it does in sh...

2 points

what I'm saying is that the relevant diff is X & Z, not Y & Z (or ideally three-way).

yes i know. my point is that your issue intrinsic to the way pacman works here - pacdiff diffs pacnew files, but you only have pacnew files because you no longer have the file that you want to diff against. in other words, if you still had this file still, you would have nothing for pacdiff to do :-).

I don't even think I'm asking for a weird extra feature

you are because the file doesn't exist. it is not given that you have access to it anymore, or that pacman knows which version was previously installed. so you need to create some mechanism to preserve it, or source it again.

but fortunately it isn't a complicated thing to solve. go the pacman.log/cache route, which is very sloppy imo. or go with backing up backup files on initial install, then clobbering those with either the new backup file, or the pacnew on updates.

The 'backup' file is just the live in-use config file though right, most people will change at least some of them?

yea, the backup files are a list of config files (usually) that a user might change. it is important that pacman doesn't clobber them on updates. but also it acts as a list of files to backup on package removal via pacsave. the second part of the question: of course, that is the point of the list

1 points

Is there a reason that isn't just the default behaviour?

have a look at HANDLING CONFIG FILES in pacman's manual.

the only reason you have a pacnew file is because you've changed the backup file (so you don't have the file you want to diff against anymore).

you can do some different things if you want to diff, or 3way merge against the last packaged file. you need to preserve the file (or remake/redownload the old package). there is p3wm that uses pacman.log and your package cache to do this... no idea how well it works, but it depends on a more or less default setup and a populated local cache. but you could roll your own with pacman hooks i think (and a modified pacdiff).

2 points

i know what you are talking about.

you can clear the swap after hibernate by toggling swap off and on if you need to.

example:

$ sudo bash -c 'swapoff -a; swapon -a'

edit: adding a ref (@"Q: After resuming, system is paging heavily, leading to very bad interactivity.")

2 points

just a note and an anecdote:

there used to be a script called pacman-optimize that did this. it was removed when contrib/ moved to pacman-contrib, because it wasn't seen as useful.

i'm hesitant to say that i still have use for the method. i have one machine with a packed xfs drive that was just running 20s for pacman -Qi bash after dropping cache (had ran a defrag on the partition). after "optimizing" i can do 5s after dropping cache.

4 points

[EDIT:] oh, i see this is addressed below.

because you can't be sure without log inspection that the database is not in sync with your installed packages.

i think you can.

pacman -Qqu

so, exit 0 if out of sync, 1 if in sync.

or i guess you could just always do pacman -Su instead of pacman -S


Also in my workflow I have to -Syu more often because I don't build packages from the AUR locally, but on a remote repository, so usually they don't exist in my stale databases.

if you're not aware of it: check out pacsync from the pacutils package. you might find that useful depending on your setup.

1 points

However, as far as auracle or package management is concerned everything is up to date.

yea, pacman does not do versioned packages (same exception as my edited note above though).

so as you see build order matters-

try running auracle buildorder termite-git

you will get a parsable list back for dependencies.

you should see AUR vte3-ng vte3-ng

if package vte3-ng is also outdated then you know you need to rebuild for termite-git

What's wrong with my understanding above?

nothing as far as i see. you know you don't want to build termite-git before updating vte-ng in that case.

2 points

So outdated also builds and installed? My understanding was that auracle doesn't do anything makepkg does.

oh, no. it doesnt. you just don't have to iterate over a list of packages for updates yourself.

i misunderstood you. so to answer the question: yea, you've got to run makepkg on each pkg that need an update. it's the only way.

you can handle a failure however you want though.


The surprise for me was discovering that for upgrades pacman doesn't care about order. That's bugging me as I don't understand how build-time dependencies can be met if that's the case.

that is not correct. order matters during building - for sure.

EDIT - a clarification:

the above is for building packages.

when installing built packages with pacman then "order" doesn't matter. but, there isn't really an order. packages that require a specific version of a package are sort of an exception (rare case, ffmpeg is an example of a package with this type dependency).

2 points

to answer the questions:

Q1: no. you can use auracle's outdated. if you don't use a local repo for aur packages then use it with no arguments. if you have a repo of packages pass them as arguments to outdated, like auracle outdated $(pacman -Sql aurrepo) or something

- or use the aur rpc and vercmp and do it yourself.

Q2: if you are using auracle already you can use buildorder and parse the output.

- or parse .SRCINFO (makepkg --printsrcinfo when needed)

remember three things:

  • handle split packages

  • if building in clean chroot the fresh dep packages will have to be available (installed) to the chroot

  • vcs packages: if you are following commits you need to check for updates differently

It seems that the answer to both is to script the makepkg calls in a way that respects dependencies, by which point you end up with a helper.

yea pretty much. is that a problem though?

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.